App error on Google Play

walterf25

Expert
Licensed User
Longtime User
Hello Erel, i need your help, I think i may have an idea of what the problem could be, but i need your help to be 100% sure I have received this exception in one of my apps in Google play, I about 6 customers who have reported the same error.

java.lang.RuntimeException: java.io.FileNotFoundException: /mnt/sdcard/Android/data/com.genesisitdev.thepiratebay/files/1 (Permission denied)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:193)
at anywheresoftware.b4a.BA$3.run(BA.java:303)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.io.FileNotFoundException: /mnt/sdcard/Android/data/com.genesisitdev.thepiratebay/files/1 (Permission denied)
at org.apache.harmony.luni.platform.OSFileSystem.openImpl(Native Method)
at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:152)
at java.io.FileOutputStream.<init>(FileOutputStream.java:97)
at anywheresoftware.b4a.objects.streams.File.OpenOutput(File.java:348)
at com.genesisitdev.thepiratebay.httputils2service._hc_responsesuccess(httputils2service.java:135)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
... 10 more

Can you maybe check it out and let me know what you think the issue is, I know it has to do with the SD card, but i don't understand why it would say (permission denied)

any thoughts?

thanks,
Walter
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
How did you set TempFolder? Make sure that the manifest file is not read-only.

1. Check the generated manifest file. Does it include: "<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />"?

2. You should check for File.ExternalWritable before setting TempFolder to the sd card. The sd card might be locked if the device is connected with a usb cable.
 
Upvote 0
Top