Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with importing backuped Collection view/Game/User #152

Open
Kaligula0 opened this issue Jun 22, 2020 · 14 comments
Open

Problem with importing backuped Collection view/Game/User #152

Kaligula0 opened this issue Jun 22, 2020 · 14 comments

Comments

@Kaligula0
Copy link
Contributor

I exported all 3 long time ago. A while ago, after an install of recent version, I wanted to restore them but I couldn't and I can't, the files are unclickable, nothing happens.
I mean export/import on this screen
Screenshot_20200622-110720
Files exported previously, now can't be imported.
Screenshot_20200622-110709

Is this problem on my side or anyone else has this problem, too?

@Kaligula0 Kaligula0 changed the title Problem with import backuped Collection view/Game/User Problem with importing backuped Collection view/Game/User Jun 22, 2020
@mjsztainbok
Copy link

I have the same problem. The files are greyed out in the file selector.
Screenshot_20200822-191451_Files

@ccomeaux
Copy link
Owner

The import logic is quite different between Android versions before KitKat 4.4 (SDK 19). What versions of the OS are you running?

@mjsztainbok
Copy link

Android 10
Screenshot_20200924-002645_Settings

@Kaligula0
Copy link
Contributor Author

Android 9 @ Sony Xperia XZ1 Compact (G8441)

@Kaligula0
Copy link
Contributor Author

Does that commit dc8f16b address this issue? 😃

If not, maybe this makes problems? Sorry, if this is silly, I know nothing of Java/Kotlin, I'm just trying to get this resolved :(

@KleineGelbe
Copy link

I just came across this issue (Samsung S20+ with latest android).
I'm not sure if it helps, but my husband just found a workaround.

We exported the files to my Google Drive account, edited the files with my PC and imported the files in the app.
The progress bar wouldn't move but that was the only "problem" I had.
Every saved view was restored.

@Kaligula0
Copy link
Contributor Author

Kaligula0 commented Jan 29, 2022

Nice trick, but either doesn't work for me or I'm doing sth wrong. Could you please explain more details?

  1. Now I see that if I export a new backup to Google Drive it can be imported from Drive.
  2. And files (old or new) exported to internal/external SD card cannot be imported from SD.
  3. Files exported to SD and uploaded to Drive cannot be imported from Drive.
  4. Files exported to Drive, not edited, and downloaded to SD can be imported from SD - but in System File Picker they can be selected only via "Downloads"* tab or "Latest"* tab (cannot be selected browsing "Internal SD"* or "External SD"*).
  5. Files exported to Drive, edited on PC (Notepad++) and reuploaded cannot be imported from Drive.

*) sorry if translation of these names is not 100% accurate, I don't use English language Android system

@Kaligula0
Copy link
Contributor Author

UPDATE to 4th case in previous post.

I checked it. I can import any (new and old!) backup via System File Picker from SD but only from "Downloads" or "Latest". This happened after I exported one backup to Google Drive and downloaded it (I wrote above that such files can be imported, pure case 4th). Then I deleted the downloaded file. And I copied an old backup to Download directory. Then, while trying to import, the System File Picker showed the old file (in "Downloads" or "Latest" only) as selectable. BUT. It showed the timestamp and filesize of the removed file! It looks like there's a bug somewhere (File Picker, system or BGG4A) that fools the app (or the File Picker) thus letting me select the old backup. And of course it only works if the desired file has the same name as the downloaded one.

Finally I imported what I wanted. But I'm not sure it will work next time 🤷‍♂️

Pretty weird thing...

@timepieces141
Copy link

timepieces141 commented Jan 29, 2022

I had this issue yesterday on the latest version (6.8.1) of BGG4A. When I navigated to Google Drive, where I had uploaded the files for safe keeping, I found that the recently exported files were not selectable. I downloaded them, but that didn't change anything. But I had old backups on Drive that were selectable, which was when I remembered I had this issue before. But I didn't remember how to fix it.

I will point out that Google Drive reported the newly exported files as "unknown" file type (even though they have .json extension and text contents). But my old backups (which presumably I did something to to make them importable) reported the type as Text.

My vague recollection was that I copied the contents to new files. So I made copies of the files I knew worked and copied in the contents of the recently exported files. Which worked.

This makes me think there is an encoding issue. I'm a software engineer, but I've only dabbled in tutorials for Android/Kotlin. Is it possible that when an app requests a file manager to pick a file, it places filters on the file types it will take? And if so, might it go beyond the extension to the encoding of the contents? If so, it's possible the export encodes one way (utf-8, let's say), and the import expects another encoding (say, latin-1) - maybe even one of them not enforcing it, and the OS substituting a default.

@KleineGelbe
Copy link

Nice trick, but either doesn't work for me or I'm doing sth wrong. Could you please explain more details?

  1. Now I see that if I export a new backup to Google Drive it can be imported from Drive.
  2. And files (old or new) exported to internal/external SD card cannot be imported from SD.
  3. Files exported to SD and uploaded to Drive cannot be imported from Drive.
  4. Files exported to Drive, not edited, and downloaded to SD can be imported from SD - but in System File Picker they can be selected only via "Downloads"* tab or "Latest"* tab (cannot be selected browsing "Internal SD"* or "External SD"*).
  5. Files exported to Drive, edited on PC (Notepad++) and reuploaded cannot be imported from Drive.

*) sorry if translation of these names is not 100% accurate, I don't use English language Android system

Sorry for the late reply. We've been out all day and just came in.
I did an export directly to my Google Drive Main Folder. (Not sure how it is called in English as I'm using it in German).
Used the "new" Google Drive Windows App (where you're drive folder is mounted as G:) to sync the file with my PC (Win 10). Then I copied the content of an old export to the new file with Notepad++. I let Google do it's sync and voila.

We thought it might be a file rights issue.

@Kaligula0
Copy link
Contributor Author

Kaligula0 commented Jan 29, 2022

I hereby confirm that exporting a file to Google Drive + editing content of that file + importing that same file (with new content) = WORKS. Just like @KleineGelbe and @timepieces141 said before. Thank you! What a heck of struggle! :(

  • Copying the good Google Drive file with Windows messes sth up. Copying with Google Drive website or Android app doesn't.
  • Editing the good file and uploading manually via Google Drive website messes sth up, too. Syncing with Google Drive app doesn't.
  • Also exporting to internal/external phone memory does the same.

@Kaligula0
Copy link
Contributor Author

@ccomeaux Can you export backups to phone memory and import them back? I wonder if it's app-dependent or phone-dependent issue.

@Kaligula0
Copy link
Contributor Author

The issue still exists on Samsung Galaxy S22 with latest Android 12 in latest BGG4A v6.8.2 app. Still the same workaround works.

@Kaligula0
Copy link
Contributor Author

Just for reference – the same issue thread in BGG guild: https://boardgamegeek.com/thread/2869756/importexport-backup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants