Software Archive
Read-only legacy content
17061 Discussions

Android version fail - thumbs.db files problem?

Anya_A_
Novice
682 Views

Hi, I'm building a Hybryd app using Cordova on my PC (Windows 10). Intel XDK version 3522. With Android version there is a problem when launching app directly and not from AppPreview. When launched from Debug tab the app works fine, but if it's installed directly - afer the launch the screen is just black. I've checked adb log and there is an error:

E/AndroidProtocolHandler(26940): Unable to open asset URL: file:///android_asset/www/js/assets/bootstrap/progress/Thumbs.db?v=43d353253552a3e20a97e181f8f6d390

I've had a problem like that before but that time I wasn't porting the game myself. Removing thumbs.db files from the project helped back then. But with this project removing those files from folders doesn't work. The app still doesn't work with the same error in the log. I've tried making a new project and turned off creation of thumbs.db files - didn't help as well. Could it be connected to the way it's built in the cloud so those files are added there? Here is a link to the project reproducing the problem and the apk: https://we.tl/71Gy8U3IVs

0 Kudos
1 Solution
Anya_A_
Novice
682 Views

I've found the problem and fixed it :) I just needed to delete those files from a list of assest to load in the Flambe-generated js file. Duh...

Thank you for your time and explanations! It helped!
 

View solution in original post

0 Kudos
6 Replies
PaulF_IntelCorp
Employee
682 Views

Anya -- I recommend you use remote CDT to debug this in the built app. See this doc page for help with that > https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview#RemoteChromeDevTools <

Also, I see that you've included a weinre script tag in the app you supplied, that could be causing the problems you're seeing. You should only have a weinre script tag enabled if you are actually using it, otherwise it will cause troubles.

0 Kudos
Anya_A_
Novice
682 Views

Paul, thank you for your message. I've tried CDT and got the same error:

file:///android_asset/www/js/assets/bootstrap/progress/Thumbs.db?v=43d353253552a3e20a97e181f8f6d390 Failed to load resource: net::ERR_FILE_NOT_FOUND

That was with a new build with weinre script removed, so I guess it has to be something else.

0 Kudos
PaulF_IntelCorp
Employee
682 Views

Does this Thumbs.db file exist in the project? Normally these are leftover image caching files created by Windows to facilitate quick preview of images in the Windows file explorer, so they should not be required or referenced by the app. Is your app using some sort of tool to load and install code dynamically? Like a require type tool that is scraping all files inside a folder? Maybe this app needs that file? For what, I don't know.

0 Kudos
Anya_A_
Novice
682 Views

No, it's not in the project. I've turned off automatic creation of those files also. I'm using Flambe engine but I'm not sure if it uses anything like this. Any reason why it works in Debug tab but not as a stand-alone app?

0 Kudos
PaulF_IntelCorp
Employee
682 Views

When your app runs in the Debug tab it is not located in a typical install location, like it is with a built app. Instead, it's located in an area where the debug container has read/write privileges, which is not the norm for the location where your app is installed as a built app. This is because the debug container needs to be able to write your app files, etc. in order to support the incremental update feature. You can inspect window.location.pathname in each of those contexts to see the difference (as well as how it looks in the Simulate tab), or use these functions to get the same info > https://github.com/gomobile/sample-hello-cordova/blob/master/www/xdk/xdk-lib-util.js#L57 <

So if there are some invalid assumptions regarding file access, that could explain the difference. I do not know anything about Flambe or how it works, so I'm not much help in figuring out the next step. You might want to search the web for problems with Flambe in a Cordova or PhoneGap app. If it's only trying to read files, that shouldn't be a problem (unless, of course, the file's not there). If it's trying to write files, that will definitely be a problem. The Cordova file plugin provides some nice background on what parts of the various device file systems are accessible, here > https://github.com/apache/cordova-plugin-file <

It could also be some sort of a permissions problem, but I'm not sure where to begin on this one. Best way to trace this might be to figure out what is Flambe doing with these Thumbs.db files, how is it accessing them, is it only reading or also writing, etc. That would shed more light on how to debug deeper what is going on.

0 Kudos
Anya_A_
Novice
683 Views

I've found the problem and fixed it :) I just needed to delete those files from a list of assest to load in the Flambe-generated js file. Duh...

Thank you for your time and explanations! It helped!
 

0 Kudos
Reply