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

Invalid Uri (dbflow:) used for observer #329

Closed
nithdi opened this issue Jul 16, 2015 · 3 comments
Closed

Invalid Uri (dbflow:) used for observer #329

nithdi opened this issue Jul 16, 2015 · 3 comments
Labels

Comments

@nithdi
Copy link

nithdi commented Jul 16, 2015

Hello,

I am currently investigating an issue we have with one of our models. We are using a FlowContentObserver to listen to changes for a single model.

When registering this observer, our app crashes with the error

Invalid Uri (dbflow:) used for observer

The whole stacktrace:

Uncaught Exception
    java.lang.RuntimeException: Unable to create application com.myapp.OneApplication: java.lang.IllegalArgumentException: Invalid Uri (dbflow:) used for observer
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4556)
            at android.app.ActivityThread.access$1500(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5254)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
     Caused by: java.lang.IllegalArgumentException: Invalid Uri (dbflow:) used for observer
            at android.os.Parcel.readException(Parcel.java:1550)
            at android.os.Parcel.readException(Parcel.java:1499)
            at android.content.IContentService$Stub$Proxy.registerContentObserver(IContentService.java:701)
            at android.content.ContentResolver.registerContentObserver(ContentResolver.java:1571)
            at android.content.ContentResolver.registerContentObserver(ContentResolver.java:1563)
            at com.raizlabs.android.dbflow.runtime.FlowContentObserver.registerForContentChanges(FlowContentObserver.java:188)
            at com.myapp.BoxCommunicator.registerObservable(BoxCommunicator.java:113)
            at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4553)
            at android.app.ActivityThread.access$1500(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5254)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

The strange thing here is that it currently does not work for currently only one app installation. This app installation did ran an AlterTableMigration on the model we want to observe.

Do you have any hint where the issue might be?

Thanks in advance!

@kaeawc
Copy link
Contributor

kaeawc commented Aug 17, 2015

@nithdi Could you post more information about the model and the alter table migration you mentioned? Since you're only seeing it for one app instance and that instance has a migration, sounds very likely the root issue is the migration is not being written the way you expect. Have you tried to make a backup of the app and see what the actual sqlite database looks like both before and after the migration?

@agrosner
Copy link
Owner

yes @nithdi need more info

@nithdi
Copy link
Author

nithdi commented Aug 21, 2015

We moved forward in development and can't reproduce this issue anmyore. I think we can close the it for the moment.I will post another comment with more information about the model and migration here when this happens again.

@nithdi nithdi closed this as completed Aug 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants