Author Topic: [Solved] OXCE for Android not updating correctly (permission issues)  (Read 2989 times)

Offline AmanitaVerna

  • Sergeant
  • **
  • Posts: 32
    • View Profile
Since updating OXCE on Android to 7.7, and XCom Files to 2.6, every time I tried to view a report (like from a new tech, or in the UFOpedia), OXCE has either frozen, or crashed with a fatal error like this:

[FATAL]   A fatal error has occurred: Interface articleTextImage not found
[FATAL]   Unfortunately, no stack trace information is available

I've also seen articleText or something like that, where articleTextImage is in that error message.

Updating to 7.7.3 didn't fix it, but rolling back to 7.5.3 did.
Here's everything i tried which didn't fix it, before I rolled back to 7.5.3:
  • Updating OXCE again to 7.7.3
  • Redownloading xcom files (the zip file was exactly the same, but i replaced it anyways)
  • Installing the UFO/TFTD data patches even though they were almost certainly already installed
  • Restarting my phone
  • Trying to open four different reports and trying a couple reports multiple times, to make sure it wasn't just a single new broken report in XCom Files (It happened even with ones I had read in the past, and I got a random freeze or crash each time)
  • Moving the OXCE app off my SD card and back into internal storage, even though being on the SD card had not caused any problems before.
  • Trying 7.6 from the old releases page, which just popped up the folder selection dialog on start and then crashed, every time I tried to run it
« Last Edit: October 10, 2022, 12:44:04 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: OXCE for Android not updating correctly (permission issues)
« Reply #1 on: October 06, 2022, 03:58:54 pm »
This error means that the OXCE data files (located in the `standard` folder) were not updated.
Specifically the `xcom1/interfaces.rul` file.

I'd recommend to uninstall OXCE, then manually delete anything that may have remained and install OXCE fresh.

Under no circumstances should you ever copy the `common` and/or `standard` folder from any previous installation, from any PC installation or from any mod distribution.
« Last Edit: October 10, 2022, 12:46:03 pm by Meridian »

Offline AmanitaVerna

  • Sergeant
  • **
  • Posts: 32
    • View Profile
Re: OXCE for Android not updating correctly (permission issues)
« Reply #2 on: October 07, 2022, 07:05:39 am »
Okay, after:
1. uninstalling OXCE
2. removing all the folders in my data folder (which is on my SD card) except mods, UFO, and TFTD
3. Briefly panicking because [internal storage]/Android/data/org.libsdl.openxcom appeared to be gone, and that was where my saved games and config file were
3. reinstalling OXCE 7.7.3
4. Launching OXCE

I am now getting a "failed to map common" error, twice, followed by the folder selection dialog (which remembers everything), and the org.libsdl.openxcom folder seems to have reappeared along with all of its contents. The errors and folder selection dialog appear each time I run OXCE now.

I checked in the folders to see what's going on, and found that OXCE didn't recreate the common, standard, xcom1, or xcom2 folders in the data folder.
[Copy UFO Data From Directory] and [Copy TFTD Data From Directory] don't appear to do anything but I don't remember if they're supposed to.
[Save and Restart] crashes instead of restarting, but it always did on my phone, and that never stopped OXCE from working before.

Edit:
First, I just realized that the saves that were restored when I reinstalled OXCE aren't the same ones which were there when i uninstalled it. I don't know where they were hiding, but they're old ones. I had to restore the correct ones from the backup on my PC.
Second, I just got 7.7.3 working properly (or, no errors on launch, no errors when trying to read reports, I haven't tried anything else yet but that's all that had broken) but to do it I had to manually extract the 1_standard.zip and 0_common.zip files from the apk, then extract the standard and common folders from them, then move said folders into the OXCE data folder.
« Last Edit: October 10, 2022, 12:47:28 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: OXCE for Android not updating correctly (permission issues)
« Reply #3 on: October 07, 2022, 09:03:42 am »
I checked in the folders to see what's going on, and found that OXCE didn't recreate the common, standard, xcom1, or xcom2 folders in the data folder.

That's the cause of the issue.

But I don't know why that would happen, it doesn't happen on my devices (Samsung S7 and Samsung A53).

Could you check if the same happens with the 7.5.3 installer?
« Last Edit: October 07, 2022, 09:17:42 am by Meridian »

Offline AmanitaVerna

  • Sergeant
  • **
  • Posts: 32
    • View Profile
Re: OXCE for Android not updating correctly (permission issues)
« Reply #4 on: October 08, 2022, 03:32:03 pm »
Hmm, 7.5.3 didn't create them either, and gave the same "failed to map common" error as a result. That's curious, because the timestamps on the common and standard folders were from February, iirc, before I replaced them with the ones from 7.7. I wonder if I had copied them from my PC originally along with the UFO and TFTD folders? (If so, it seemed to work until 7.7 failed to update them)

More things of interest (still using 7.5.3):
It's failing to create the folders even if i tell it to use the app cache to store the data files.

It can't be an inability to read the SD card where I have the data path set to - it reads the files just fine if they're there, and reads what's in the mods folder there, etc.

If I create empty "standard" and "common" folders it still fails to fill them, and errors in the same way. I probably didn't need to test that.

Here is the entire log file, though I don't know if it will be any help:
(I turned off the "use app cache to store data files" option after it didn't help)
Code: [Select]
[08-10-2022_08-18-51] [INFO] Current locale is en-us
[08-10-2022_08-18-51] [INFO] OpenXcom Version: Extended 7.5.3 (v2022-02-07)
[08-10-2022_08-18-51] [INFO] Platform: Android 16
[08-10-2022_08-18-51] [INFO] Data folder is: /storage/5F2D-9D32/OXCE/
[08-10-2022_08-18-51] [INFO] Data search is:
[08-10-2022_08-18-51] [INFO] - /storage/5F2D-9D32/OXCE/
[08-10-2022_08-18-51] [INFO] User folder is: /storage/emulated/0/Android/data/org.libsdl.openxcom/files/
[08-10-2022_08-18-51] [INFO] Config folder is: /storage/emulated/0/Android/data/org.libsdl.openxcom/files/
[08-10-2022_08-18-51] [INFO] Options loaded successfully.
[08-10-2022_08-18-51] [ERROR] FileMap::mapExtResources(common, common): external resources not found.
[08-10-2022_08-18-51] [ERROR] VFS::map_common(): failed to map 'common'
[08-10-2022_08-18-53] [FATAL] VFS::map_common(): failed to map 'common'
[08-10-2022_08-18-53] [INFO] SDL initialized successfully.
[08-10-2022_08-18-53] [INFO] SDL_mixer initialized successfully.
[08-10-2022_08-18-53] [INFO] Attempted locale:
[08-10-2022_08-18-53] [INFO] Detected locale:
[08-10-2022_08-18-53] [INFO] Setting GL format to RGB565
[08-10-2022_08-18-53] [INFO] Current _baseWidth x _baseHeight: 1280x672
[08-10-2022_08-18-53] [INFO] Attempting to set display to 1280x672x32...
[08-10-2022_08-18-53] [INFO] Attempting to create a new window since we have none yet
[08-10-2022_08-18-53] [INFO] Created a window, size is: 1280x672
[08-10-2022_08-18-53] [INFO] [SDLRenderer] Listing available rendering drivers:
[08-10-2022_08-18-53] [INFO] [SDLRenderer]  Number of drivers: 3
[08-10-2022_08-18-53] [INFO] [SDLRenderer]  Driver 0: opengles2
[08-10-2022_08-18-53] [INFO] [SDLRenderer]    Number of texture formats: 4
[08-10-2022_08-18-53] [INFO] [SDLRenderer]     Texture format 0: SDL_PIXELFORMAT_ARGB8888
[08-10-2022_08-18-53] [INFO] [SDLRenderer]     Texture format 1: SDL_PIXELFORMAT_ABGR8888
[08-10-2022_08-18-53] [INFO] [SDLRenderer]     Texture format 2: SDL_PIXELFORMAT_RGB888
[08-10-2022_08-18-53] [INFO] [SDLRenderer]     Texture format 3: SDL_PIXELFORMAT_BGR888
[08-10-2022_08-18-53] [INFO] [SDLRenderer]  Driver 1: opengles
[08-10-2022_08-18-53] [INFO] [SDLRenderer]    Number of texture formats: 1
[08-10-2022_08-18-53] [INFO] [SDLRenderer]     Texture format 0: SDL_PIXELFORMAT_ABGR8888
[08-10-2022_08-18-53] [INFO] [SDLRenderer]  Driver 2: software
[08-10-2022_08-18-53] [INFO] [SDLRenderer]    Number of texture formats: 8
[08-10-2022_08-18-53] [INFO] [SDLRenderer]     Texture format 0: SDL_PIXELFORMAT_ARGB8888
[08-10-2022_08-18-53] [INFO] [SDLRenderer]     Texture format 1: SDL_PIXELFORMAT_ABGR8888
[08-10-2022_08-18-53] [INFO] [SDLRenderer]     Texture format 2: SDL_PIXELFORMAT_RGBA8888
[08-10-2022_08-18-53] [INFO] [SDLRenderer]     Texture format 3: SDL_PIXELFORMAT_BGRA8888
[08-10-2022_08-18-53] [INFO] [SDLRenderer]     Texture format 4: SDL_PIXELFORMAT_RGB888
[08-10-2022_08-18-53] [INFO] [SDLRenderer]     Texture format 5: SDL_PIXELFORMAT_BGR888
[08-10-2022_08-18-53] [INFO] [SDLRenderer]     Texture format 6: SDL_PIXELFORMAT_RGB565
[08-10-2022_08-18-53] [INFO] [SDLRenderer]     Texture format 7: SDL_PIXELFORMAT_RGB555
[08-10-2022_08-18-53] [INFO] [SDLRenderer] Renderer created
[08-10-2022_08-18-53] [INFO] [SDLRenderer] Created new SDLRenderer, using opengles2
[08-10-2022_08-18-53] [INFO] [SDLRenderer] Current scaler is nearest
[08-10-2022_08-18-53] [INFO] [SDLRenderer] Texture pixel format set to SDL_PIXELFORMAT_ARGB8888
[08-10-2022_08-18-53] [INFO] [SDLRenderer] Texture resolution set to 1280x672
[08-10-2022_08-18-53] [INFO] Display set to 1280x672x32
[08-10-2022_08-18-53] [INFO] Pre-bar scales: _scaleX = 1, _scaleY = 1
[08-10-2022_08-18-53] [INFO] Scale (post-bar): scaleX = 1, scaleY = 1
[08-10-2022_08-18-53] [INFO] Black bars: top: 0, left: 0
[08-10-2022_08-18-53] [INFO] [SDLRenderer] Output resolution: 1280x672
[08-10-2022_08-18-53] [INFO] [SDLRenderer] Offset: 0x0
[08-10-2022_08-18-53] [INFO] Setting GL format to RGB565
[08-10-2022_08-18-53] [INFO] Current _baseWidth x _baseHeight: 640x400
[08-10-2022_08-18-53] [INFO] Attempting to set display to 1280x672x32...
[08-10-2022_08-18-53] [INFO] [SDLRenderer] Old scale hint: nearest, new scale hint: nearest
[08-10-2022_08-18-53] [INFO] [SDLRenderer] Texture resolution set to 640x400
[08-10-2022_08-18-53] [INFO] Display set to 1280x672x32
[08-10-2022_08-18-53] [INFO] Pre-bar scales: _scaleX = 2, _scaleY = 1.68
[08-10-2022_08-18-53] [INFO] Scale (post-bar): scaleX = 1.68, scaleY = 1.68
[08-10-2022_08-18-53] [INFO] Black bars: top: 0, left: 102
[08-10-2022_08-18-53] [INFO] [SDLRenderer] Output resolution: 1075x672
[08-10-2022_08-18-53] [INFO] [SDLRenderer] Offset: 102x0
[08-10-2022_08-18-53] [INFO] SDL reports this number of touch devices present: 1
[08-10-2022_08-18-53] [INFO] Loading data...
[08-10-2022_08-18-53] [ERROR] FileMap::mapExtResources(common, common): external resources not found.
[08-10-2022_08-18-53] [ERROR] VFS::map_common(): failed to map 'common'
[08-10-2022_08-18-54] [FATAL] VFS::map_common(): failed to map 'common'
[08-10-2022_08-18-54] [INFO] Scanning standard mods in '/storage/5F2D-9D32/OXCE/'...
[08-10-2022_08-18-54] [INFO] Scanning user mods in '/storage/emulated/0/Android/data/org.libsdl.openxcom/files/'...
[08-10-2022_08-18-54] [INFO] Scanning user mods in '/storage/5F2D-9D32/OXCE/'...
[08-10-2022_08-18-56] [WARN] checkModsDependencies(): x-com-files: missing master mod xcom1
[08-10-2022_08-18-56] [ERROR] no mod masters available
[08-10-2022_08-18-56] [ERROR] No X-COM installations found
[08-10-2022_08-18-56] [INFO] Found candidate method ID: 0xf1408f9c
[08-10-2022_08-18-56] [INFO] Returned to native code!
[08-10-2022_08-19-01] [WARN] The OS is not happy with us! We're gonna die!

Offline yergnoor

  • Colonel
  • ****
  • Posts: 123
    • View Profile
Re: OXCE for Android not updating correctly (permission issues)
« Reply #5 on: October 08, 2022, 05:55:38 pm »
It can't be an inability to read the SD card where I have the data path set to - it reads the files just fine if they're there, and reads what's in the mods folder there, etc.
It is not the inability to read from the memory card, but the inability of the application to write to the memory card. OXCE has no rights to work with it and therefore cannot write the common and standard folders to /storage/5F2D-9D32/OXCE/, which is specified as the location for the data.
I myself have used a memory card for this purpose, and I had to first install the game in the internal memory of Android, so the game could unpack the necessary folders standard and common, and only then transfer all the data to an external memory card.

Offline AmanitaVerna

  • Sergeant
  • **
  • Posts: 32
    • View Profile
Re: OXCE for Android not updating correctly (permission issues)
« Reply #6 on: October 09, 2022, 01:20:45 am »
Odd that I couldn't get it to write to the internal storage by checking the checkbox that tells it to use the app cache instead. That works fine for the saved games and config file.

Edit: I figured out a way to resolve the problem. Since apps are able to both read and write to [external]/Android/data/[app], and [external]/Android/media/[app] (and I assume to Android/obb as well), I changed the data folder to /storage/5F2D-9D32/Android/media/org.libsdl.openxcom. That way it can be on the SD card, and OXCE can still have full access to update the files as needed.

(I left the saved games on internal storage, though, because I'm synchronizing them with my PC using syncthing, and it has the same problem.)
« Last Edit: October 10, 2022, 07:10:29 am by AmanitaVerna »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: OXCE for Android not updating correctly (permission issues)
« Reply #7 on: October 10, 2022, 12:43:39 pm »
I have extracted this into a separate thread, so that it can be found more easily by others.

TLDR:
- install OXCE into the main phone storage, don't experiment, it's not worth it... OXCE is just a couple of megabytes
- you can install mods on the SD card if you want

Offline Malefik

  • Squaddie
  • *
  • Posts: 2
    • View Profile
Re: [Solved] OXCE for Android not updating correctly (permission issues)
« Reply #8 on: November 28, 2022, 11:51:55 pm »
Hi everyone!
Just have the same problem: huawei mate 20pro, EMUI 12.
After updating to OCXE 7.7.3 and first launch I cannot select folders with cash UFO and TFTD, and cannot manualy select path to "data files" (first checkbox on initial screen). Somehow i managed to copy cashfolders everywhere i can and games starts EVERYtime with initial start screen. And i cannot read UFOPEDIA etc. in game.
Recently i download OCXE 7.8, delete previous version and made a clean install and nothing worked at all. I can't change path of istallation i even don't have an SDCard on my phone.
So im desperate.
Have you any ideas?
on my out-of-date tablet with Android 4.4.2 everything works fine.

PS
Sorry for my english.
« Last Edit: November 28, 2022, 11:58:46 pm by Malefik »

Offline Malefik

  • Squaddie
  • *
  • Posts: 2
    • View Profile
Re: OXCE for Android not updating correctly (permission issues)
« Reply #9 on: December 06, 2022, 08:04:57 pm »
I have extracted this into a separate thread, so that it can be found more easily by others.

TLDR:
- install OXCE into the main phone storage, don't experiment, it's not worth it... OXCE is just a couple of megabytes
- you can install mods on the SD card if you want

Hi again, nothing of this works becouse i cant set path to the cash files of original games... I tried everything, i can attach logs if needed...

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: [Solved] OXCE for Android not updating correctly (permission issues)
« Reply #10 on: December 06, 2022, 08:13:09 pm »
Then don't set any paths.
You don't even need to use the Java loader at all.
Assuming you installed into the default folder (/openxcom/)... just copy the original files to /openxcom/UFO/  or to  /openxcom/TFTD/  and the game will not ask anything anymore ever.
« Last Edit: December 06, 2022, 08:19:20 pm by Meridian »