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

Failed to restore data #653

Open
electro575 opened this issue Jan 22, 2019 · 7 comments

Comments

Projects
None yet
5 participants
@electro575
Copy link

commented Jan 22, 2019

The bug appear when i try to backup data from database exported.

Context

How to reproduce
Steps to reproduce the behavior:

  1. Go to app
  2. Click on 'parameters' -> data -> sync and save -> restore -> choose the database exported
  3. Database successfull restored
  4. See no data when openned app but sucessfull notification app

**adb logcat - Log LineageOS 16.0 (Android 9.0) **
W Omni Notes FOSS: Error fetching app metadata

I ActivityManager:
Start proc 7538:it.feio.android.omninotes.foss/u0a90 for activity it.feio.android.omninotes.foss/it.feio.android.omninotes.MainActivity
W main    : type=1400 audit(0.0:5049): avc: denied { read } for name="u:object_r:adbtcp_prop:s0" dev="tmpfs" ino=7197 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:adbtcp_prop:s0 tclass=file permissive=0
W main    : type=1400 audit(0.0:5050): avc: denied { read } for name="u:object_r:alarm_boot_prop:s0" dev="tmpfs" ino=7198 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:alarm_boot_prop:s0 tclass=file permissive=0
W main    : type=1400 audit(0.0:5051): avc: denied { read } for name="u:object_r:alarm_handled_prop:s0" dev="tmpfs" ino=7199 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:alarm_handled_prop:s0 tclass=file permissive=0
W main    : type=1400 audit(0.0:5052): avc: denied { read } for name="u:object_r:alarm_instance_prop:s0" dev="tmpfs" ino=7200 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:alarm_instance_prop:s0 tclass=file permissive=0
W main    : type=1400 audit(0.0:5053): avc: denied { read } for name="u:object_r:bg_boot_complete_prop:s0" dev="tmpfs" ino=7202 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:bg_boot_complete_prop:s0 tclass=file permissive=0
E .omninotes.fos: Not starting debugger since process cannot load the jdwp agent.
I MultiDex: VM with version 2.1.0 has multidex support
I MultiDex: install
I MultiDex: VM has multidex support, MultiDex support library is disabled.
I ACRA    : ACRA is disabled for it.feio.android.omninotes.foss, initializing...
I AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
W Omni Notes FOSS: Error fetching app metadata
W Omni Notes FOSS: java.net.MalformedURLException: no protocol:
W Omni Notes FOSS:     at java.net.URL.<init>(URL.java:601)
W Omni Notes FOSS:     at java.net.URL.<init>(URL.java:498)
W Omni Notes FOSS:     at java.net.URL.<init>(URL.java:447)
W Omni Notes FOSS:     at it.feio.android.omninotes.async.UpdaterTask.getAppData(UpdaterTask.java:165)
W Omni Notes FOSS:     at it.feio.android.omninotes.async.UpdaterTask.doInBackground(UpdaterTask.java:83)
W Omni Notes FOSS:     at it.feio.android.omninotes.async.UpdaterTask.doInBackground(UpdaterTask.java:51)
W Omni Notes FOSS:     at android.os.AsyncTask$2.call(AsyncTask.java:333)
W Omni Notes FOSS:     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
W Omni Notes FOSS:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
W Omni Notes FOSS:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W Omni Notes FOSS:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W Omni Notes FOSS:     at java.lang.Thread.run(Thread.java:764)
D Omni Notes FOSS: Started navigation drawer initialization
D Omni Notes FOSS: Finished navigation drawer initialization
D Omni Notes FOSS: initNotesList intent: android.intent.action.MAIN
I MockAnalyticsHelper: MockAnalyticsHelper instance methods are empty. No analytic data will be collected.
V Omni Notes FOSS: Query: SELECT creation,last_modification,title,content,archived,trashed,alarm,reminder_fired,recurrence_rule,latitude,longitude,address,locked,checklist,category_id,name,description,color FROM notes LEFT JOIN categories USING( category_id)  WHERE archived IS NOT 1 AND trashed IS NOT 1  ORDER BY last_modification DESC
D Omni Notes FOSS: {settings_text_size=default, settings_enable_swipe=true, expanded_view=true, settings_send_analytics=false, settings_prettified_dates=false, sorting_column=last_modification, acra.enable=false, settings_current_app_version=247, settings_notification_snooze_delay=10, settings_instant_search=false, settings_notification_vibration=true, navigation=Notes, settings_navdrawer_on_exit=false, settings_show_category_count=true, acra.legacyAlreadyConvertedTo4.8.0=true, settings_swipe_to_trash=false, settings_dynamic_menu=true, settings_checked_items_behavior=0, settings_fab_expansion_behavior=true, settings_language=fr_FR, settings_simple_calendar=true, settings_password_access=false, settings_colors_app=strip, pref_tour_complete=true, settings_attachments_on_bottom=false, settings_auto_location=false, settings_show_uncategorized=true, acra.lastVersionNr=247}
D OpenGLRenderer: Skia GL Pipeline
V Omni Notes FOSS: Query: Retrieval finished!
I Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8974_LA.BF.1.1.3_RB1__release_AU (I741a3d36ca)
I Adreno-EGL: OpenGL ES Shader Compiler Version: E031.29.00.00
I Adreno-EGL: Build Date: 04/04/16 Mon
I Adreno-EGL: Local Branch: mybranch19053788
I Adreno-EGL: Remote Branch: quic/LA.BF.1.1.3_rb1.12
I Adreno-EGL: Local Patches: NONE
I Adreno-EGL: Reconstruct Branch: NOTHING
I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
I OpenGLRenderer: Initialized EGL, version 1.4
D OpenGLRenderer: Swap behavior 1
W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
D vndksupport: Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
D Omni Notes FOSS: it.feio.android.omninotes.async.bus.NotesLoadedEvent
D Omni Notes FOSS: Started navigation drawer initialization
D Omni Notes FOSS: Finished navigation drawer initialization
D Omni Notes FOSS: Finished main menu initialization
D Omni Notes FOSS: Finished categories menu initialization
V Omni Notes FOSS: Query: SELECT creation,last_modification,title,content,archived,trashed,alarm,reminder_fired,recurrence_rule,latitude,longitude,address,locked,checklist,category_id,name,description,color FROM notes LEFT JOIN categories USING( category_id)  ORDER BY last_modification DESC
V Omni Notes FOSS: Query: Retrieval finished!
D Omni Notes FOSS: Dynamic menu finished counting items
E Omni Notes FOSS: Wrong element choosen: 0
D vndksupport: Loading /vendor/lib/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace.
D vndksupport: Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
D Omni Notes FOSS: onNewIntent
D Omni Notes FOSS: {settings_text_size=default, settings_enable_swipe=true, expanded_view=true, settings_send_analytics=false, settings_prettified_dates=false, sorting_column=last_modification, acra.enable=false, settings_current_app_version=247, settings_notification_snooze_delay=10, settings_instant_search=false, settings_notification_vibration=true, navigation=Notes, settings_navdrawer_on_exit=false, settings_show_category_count=true, acra.legacyAlreadyConvertedTo4.8.0=true, settings_swipe_to_trash=false, settings_dynamic_menu=true, settings_checked_items_behavior=0, settings_fab_expansion_behavior=true, settings_language=fr_FR, settings_simple_calendar=true, settings_password_access=false, settings_colors_app=strip, pref_tour_complete=true, settings_attachments_on_bottom=false, settings_auto_location=false, settings_show_uncategorized=true, acra.lastVersionNr=247}
W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
D vndksupport: Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@90659e
I AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
D vndksupport: Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
W Event   : Subscriber to unregister was not registered before: class it.feio.android.omninotes.MainActivity
W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
D vndksupport: Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
D vndksupport: Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
D OpenGLRenderer: endAllActiveAnimators on 0x8a610180 (RippleDrawable) with handle 0x8bffe960
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W Notification: Use of stream types is deprecated for operations other than volume control
W Notification: See the documentation of setSound() for what to use instead

Thank's a lot

@electro575 electro575 changed the title Failed to backup data Failed to restore data Jan 22, 2019

@federicoiosue federicoiosue self-assigned this Jan 28, 2019

@federicoiosue

This comment has been minimized.

Copy link
Owner

commented Jan 28, 2019

Great bug reporting thanks a lot!

The problem should be resolved on the beta versions.
It depended by the fact that starting from Android 9 the database file is journaled and the older backup/restore mechanism was based on keeping a copy of the database file itself and restoring it but journaled db breaks everything!

Now the backup process is JSON-based (also to allow the desktop app to sync) and should resolve the problem.

@marasm76

This comment has been minimized.

Copy link

commented Feb 23, 2019

Just out of curiosity, is there an ETA for this fix to be pushed out to the F-Droid version of Omni Notes?

@electro575

This comment has been minimized.

Copy link
Author

commented Feb 24, 2019

Thanks for you reply.

I have problem after compile your app with Node.js 11.x.

I launch "omni-notes-desktop-develop/app/omni-notes-desktop-linux-x64$ ./omni-notes-desktop"

A JavaScript error occurred in the main process
Uncaught Exception:
Error: Unable to find a valid app
    at Object.<anonymous> (/home/jo/Téléchargements/omni-notes-desktop-develop/app/omni-notes-desktop-linux-x64/resources/electron.asar/browser/init.js:137:9)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:154:18)
    at node.js:416:3

Have you a solution ?

@lolilolicon

This comment has been minimized.

Copy link

commented Mar 22, 2019

@federicoiosue, quick question: with the next release, will I be able to restore an old backup on Android 9? If not, what're the workarounds?

@lolilolicon

This comment has been minimized.

Copy link

commented Apr 8, 2019

@federicoiosue, I guess you've been busy, but this bug has been preventing me from using Omni Notes for a good month now. I can't restore my backup and I'm not adding any new notes for fear that a backup restore later will erase them.
Would it possible for you to make a new release on F-Droid sometime soon?

(Sorry for double posting. And thank you very much for your work!)

@travellers

This comment has been minimized.

Copy link

commented Jul 7, 2019

Hi, @electro575,
Could you please help verify my patch at #682 ?
we need more tests.
Thank you very much!

@electro575

This comment has been minimized.

Copy link
Author

commented Jul 7, 2019

Hi, @travellers
I want to compile the apk with this video

https://asciinema.org/a/102898

I have a problem when i launch this command, ./gradlew assemble --debug

I use openjdk-8-jdk in debian 9 and sdk 27.0.3.

I paste my error :
https://debian-facile.org/paste-paste.php

Task :omniNotes:transformClassesAndResourcesWithProguardForAlphaRelease FAILED
21:22:49.152 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
21:22:49.155 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 1m 7s

Can you help me on this topic ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.