Android Permission denied, always failure LOAD save file

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
dyrarendy
Regular
Posts: 59
Joined: Wed Apr 02, 2014 12:26 pm
Projects: Visual Novel Dating Sims Masa SMA
Location: Indonesia, Cimahi
Contact:

Android Permission denied, always failure LOAD save file

#1 Post by dyrarendy »

All permission are setting enabled, and game are saved successfully.
but after quit and restart the game, we cant LOAD our save files. All savefiles.

I had been upload my VN to googleplay, and reach 1000+ downloaded from there. And thats a problems...
all of them cant load save games.. Oh.. whats wrong is happened...

I had been rebuild, repackaging, and create new new apk, but still, cant LOAD with the same method. What should i do ?
(T-T) .. they starts complaining.

U can see from image below :
Image
My Project :
Image

User avatar
dyrarendy
Regular
Posts: 59
Joined: Wed Apr 02, 2014 12:26 pm
Projects: Visual Novel Dating Sims Masa SMA
Location: Indonesia, Cimahi
Contact:

Re: Android Permission denied, always failure LOAD save file

#2 Post by dyrarendy »

Is it similar to Python IOError: [Errno 13] Permission denied ?

Here some Example
My Project :
Image

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Android Permission denied, always failure LOAD save file

#3 Post by PyTom »

Can you give me the googe play link? I have a rooted phone, so maybe I can figure this out.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
dyrarendy
Regular
Posts: 59
Joined: Wed Apr 02, 2014 12:26 pm
Projects: Visual Novel Dating Sims Masa SMA
Location: Indonesia, Cimahi
Contact:

Re: Android Permission denied, always failure LOAD save file

#4 Post by dyrarendy »

PyTom wrote:Can you give me the googe play link? I have a rooted phone, so maybe I can figure this out.
:D here sir :

Google Play


Oh, i used my native language in my vn.

Lanjutkan = Load
Simpan = Save
Mulai = Start
My Project :
Image

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Android Permission denied, always failure LOAD save file

#5 Post by PyTom »

I can't repeat this on my device, when I try it, it works. Can you stick this in the game, and tell me the result:

Somewhere:

Code: Select all

init python:
    import os
    try:
        stat_test = os.stat("/data/data/com.novelvisual.indonesiadatingsimsmasamasa/files/saves/1-1-LT1.save"
    except:
        stat_test = "Couldn't stat file."
Right after label start:

Code: Select all

    "[stat_test]"
This might help me figure out what's going on. Thanks!
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
dyrarendy
Regular
Posts: 59
Joined: Wed Apr 02, 2014 12:26 pm
Projects: Visual Novel Dating Sims Masa SMA
Location: Indonesia, Cimahi
Contact:

Re: Android Permission denied, always failure LOAD save file

#6 Post by dyrarendy »

"I can't repeat this on my device, when I try it, it works."
is the Load system working properly sir?

The results is always : "Couldn't stat file."
My Project :
Image

User avatar
SONTSE
Regular
Posts: 96
Joined: Sun Nov 24, 2013 10:49 pm
Completed: 11 VN's so far
Discord: jkx0282_10798
Contact:

Re: Android Permission denied, always failure LOAD save file

#7 Post by SONTSE »

i'm gonna subscribe to this, 'cuz of same problem =3.
in my case the savefiles works normally until exit program. then they are still reachable if i "delete all data" in app. prefs

btw: can i force renpy to NOT store any internal data, and load it each time program starts instead?
Last edited by SONTSE on Wed Sep 03, 2014 12:55 pm, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Android Permission denied, always failure LOAD save file

#8 Post by PyTom »

Question - are either of your running any sort of security/firewall program?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
SONTSE
Regular
Posts: 96
Joined: Sun Nov 24, 2013 10:49 pm
Completed: 11 VN's so far
Discord: jkx0282_10798
Contact:

Re: Android Permission denied, always failure LOAD save file

#9 Post by SONTSE »

the most near to firewall/security program i use is ad blocking program "AdAway". now i will try to disable it and see how it works then

User avatar
SONTSE
Regular
Posts: 96
Joined: Sun Nov 24, 2013 10:49 pm
Completed: 11 VN's so far
Discord: jkx0282_10798
Contact:

Re: Android Permission denied, always failure LOAD save file

#10 Post by SONTSE »

Just done some research, and assume adaway is not the issue. (app works same whether it enabled or disabled)
but i found interesting details:

- it does save\load properly during first run after clearing data
- it does NOT load saves, made on first run after close\reload app. the slots has datestamps and clickable (click on it causes mentioned error) but does not have a thumbnail
- id DOES save\load properly if all saves made AFTER close\reload app. more to it,
- after clearing data all saves made after reload app. deleted AND saves on first run reappears. they are fully operatable

which make me think renpy uses different folders for saving in first run and every next run.

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Android Permission denied, always failure LOAD save file

#11 Post by PyTom »

Does anyone with this problem have a rooted phone? If so, could you poke around and see if the file exists?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
SONTSE
Regular
Posts: 96
Joined: Sun Nov 24, 2013 10:49 pm
Completed: 11 VN's so far
Discord: jkx0282_10798
Contact:

Re: Android Permission denied, always failure LOAD save file

#12 Post by SONTSE »

The file - save file?
if so - in my case - yes it does.
save files are in
/sdcard/android/data/(mygame)/files/saves
on first run and
/data/data/(mygame)/files/saves
on every other run

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Android Permission denied, always failure LOAD save file

#13 Post by PyTom »

Interesting. Let me try to figure out why that is. Thanks everyone.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
dyrarendy
Regular
Posts: 59
Joined: Wed Apr 02, 2014 12:26 pm
Projects: Visual Novel Dating Sims Masa SMA
Location: Indonesia, Cimahi
Contact:

Re: Android Permission denied, always failure LOAD save file

#14 Post by dyrarendy »

"/data/data/(mygame)/files/saves"

Maybe add :

Code: Select all

android.permission.WRITE_INTERNAL_STORAGE
android.permission.READ_INTERNAL_STORAGE
for default packaging, will help ?
Attachments
46546456.JPG
46546456.JPG (18.86 KiB) Viewed 2689 times
My Project :
Image

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Android Permission denied, always failure LOAD save file

#15 Post by PyTom »

Unless they added it recently, I don't think that apps need permission to read internal storage.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users