Giter Club home page Giter Club logo

Comments (11)

garijp avatar garijp commented on May 30, 2024

I have the same problem.

java.lang.IllegalStateException: could not access stored data with uri content://com.andcreate.app.trafficmonitor.tray/internal_preferences/tether/version. Is the provider registered in the manifest of your application?
at net.grandcentrix.tray.provider.TrayProviderHelper.getInternalUri()
at net.grandcentrix.tray.storage.TrayStorage.get()
at net.grandcentrix.tray.accessor.Preference.changeVersion()
at net.grandcentrix.tray.accessor.Preference.()
at net.grandcentrix.tray.accessor.TrayPreference.()
at net.grandcentrix.tray.TrayModulePreferences.()
at com.andcreate.app.trafficmonitor.tray_pref.TetherTrayPreference.()
at com.andcreate.app.trafficmonitor.aggregate.TrafficJournalIO.output()
at com.andcreate.app.trafficmonitor.aggregate.TrafficJournalOutputService.onHandleIntent()
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:211)
at android.os.HandlerThread.run(HandlerThread.java:61)

How to solve?
I'm using 0.9.2 version.

from tray.

passsy avatar passsy commented on May 30, 2024

Please answer the following questions:

  • Is there a way how to reproduce it?
  • Was it working in the past?
  • Is the authority set as string resource?
  • On which process does this problem occur?

The problem is simple: The Cursor returned from the ContentProvider is null. This can happen if the authority is not set with resValue "string", "tray__authority", "${applicationId}.tray" or if the provider returns null because the underlaying database could not be accessed.

from tray.

HandsomeL avatar HandsomeL commented on May 30, 2024

Thanks for your replication.
This problem occurs in a low probability that I can not reproduce. I have set configs as requested. I think this may happen in systems that deeply transformed. I just use try & catch to prevent crash.

from tray.

passsy avatar passsy commented on May 30, 2024

I checked analytics and found this crash too. This happens once in a million or to be exact: 10 times per month with 1.000.000 app sessions. And I'm sure tray preferences get accessed more than 10 times per session.

I'm not sure how this should be handled. I could catch the exception in the constructor and retry it when accessing data of a preference. But what should happen if the database could not be accessed when writing data? Maybe that's the reason why the SharedPreferences have commit() which returns a boolean if writing to disk was successful.

Exception handling is next on the list.

from tray.

garijp avatar garijp commented on May 30, 2024

Thank you for reply.

Is there a way how to reproduce it?

I don't know because the fabric report.

Was it working in the past?

I began to use from 0.9.2.

Is the authority set as string resource?

Yes.

On which process does this problem occur?

Remote process.

This problem has occurred in the 800 users of 10,000users.

from tray.

indywidualny avatar indywidualny commented on May 30, 2024

The same problem here. Remote process. Happens rarely but still...

from tray.

shivakumars avatar shivakumars commented on May 30, 2024

I am getting the same problem and it is consistent. It occurs only on my Samsung SM-T231 running on Android 4.4.2. The same code works perfectly fine with my Nexus 5 and Samsung S3 running on Android 5.1.1 & Android 4.3 respectively. Not sure if i am doing something wrong. Can u help?

java.lang.IllegalStateException: could not access stored data with uri content://com.mockup.sample.beta.tray/internal_preferences/userPreferences/version?backup=true. Is the provider registered in the manifest of your application?

Answers to your question,

Is there a way how to reproduce it?

Every time i instantiate preference it crashes.

Was it working in the past?

It works on my Android 5.1.1 & 4.3 device

Is the authority set as string resource?

Yes

On which process does this problem occur?

Application process(UI)

I am using 1.0.0-rc3

from tray.

shivakumars avatar shivakumars commented on May 30, 2024

Hey,

Never mind. Found the issue. The particular device is on Safe Mode. I turned off the safe mode and it started to work.

from tray.

ningacoding avatar ningacoding commented on May 30, 2024

This happen randomly, i restarted device and Tray its working well, but this shouldn't be happening because we need stable libraries.

(Tested with: Samsung Grand Neo > Android 4.4.4 Official Rom > Tray 1.0.0-rc3 > Remote Service)

from tray.

mengdd avatar mengdd commented on May 30, 2024

HI, @passsy
Our project suffers from this crash and we are waiting for the release 0.11.0 which has it fixed.
Could I know when will it be released?

from tray.

passsy avatar passsy commented on May 30, 2024

0.11.0 is released

from tray.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.