Coder Social home page Coder Social logo

room database error about paho.mqtt.android HOT 21 CLOSED

hannesa2 avatar hannesa2 commented on August 15, 2024
room database error

from paho.mqtt.android.

Comments (21)

hannesa2 avatar hannesa2 commented on August 15, 2024

it looks like the database is broken. It tries to read table modification, but there are no specified const val MQ_DB_VERSION = 1
Th most interested questions is why does it happen, here you can provide more information.
What do you do with MqttAndroidClient or with MqttService ? Is it closed and restored,.... ?

As a workaround you have to remove database anyhow, by reinstall or similar steps

from paho.mqtt.android.

hannesa2 avatar hannesa2 commented on August 15, 2024

Do you use version 3.3.4 ? It comes with Room 2.4.0

from paho.mqtt.android.

4563599 avatar 4563599 commented on August 15, 2024

from paho.mqtt.android.

4563599 avatar 4563599 commented on August 15, 2024

I search this problem on google. this https://stackoverflow.com/questions/50370683/room-migration-no-such-table-room-table-modification-log seems the same program.
I found a rule, when I log out of the account and use the MQTT function again, this problem will occur。

from paho.mqtt.android.

hannesa2 avatar hannesa2 commented on August 15, 2024

But there is no migration at all. It looks like db is broken anyhow. You see it, when db tries to read migration log

from paho.mqtt.android.

hannesa2 avatar hannesa2 commented on August 15, 2024

I found a rule, when I log out of the account and use the MQTT function again, this problem will occur。

The sample MQ-server mqtt.eclipseprojects.io looks like having issues, that's why I've no test server anymore.
That means, only you can test currently. Please have a look on MqttAndroidClient and MqttService during logout and relogin

from paho.mqtt.android.

4563599 avatar 4563599 commented on August 15, 2024

how can I have a look on MqttAndroidClient and MqttService during logout and relogin?
please tell me how can I do for you,ths!

from paho.mqtt.android.

hannesa2 avatar hannesa2 commented on August 15, 2024

Here https://github.com/hannesa2/paho.mqtt.android/blob/master/serviceLibrary/src/main/java/info/mqtt/android/service/MqttService.kt#L201 the database is opened.

And here https://github.com/hannesa2/paho.mqtt.android/blob/master/serviceLibrary/src/main/java/info/mqtt/android/service/MqttService.kt#L215 it's closed.

In the .close() there is from Room some lock mechanism.
image

Maybe it's the root cause ?

I would look into close, if it's called, when it's called. And what happens in close(). And how does the new open() impact this all

from paho.mqtt.android.

4563599 avatar 4563599 commented on August 15, 2024

you can drop the //messageStore.close() in fun onDestroy and then can you publish a new version 3.3.5 on github? I can help you have a test for this issues. Thanks!

from paho.mqtt.android.

hannesa2 avatar hannesa2 commented on August 15, 2024

Did you tested it without it. Is there an improvement, or is this just a slow test try ?

from paho.mqtt.android.

4563599 avatar 4563599 commented on August 15, 2024

My company project used to use the paho.mqtt.android which is https://github.com/eclipse/paho.mqtt.android.But it doesn't work on android 12, so I used your branch, but it works on both android 9 and android 12 this problem occurs,I want to solve this problem as soon as possible for your help.Thanks you !

from paho.mqtt.android.

hannesa2 avatar hannesa2 commented on August 15, 2024

Please try implementation 'com.github.hannesa2:paho.mqtt.android:3.3.4.1'

https://github.com/eclipse/paho.mqtt.android is a dead repo

from paho.mqtt.android.

4563599 avatar 4563599 commented on August 15, 2024

I seems work when i use the 3.3.4.1 version. No SQLITE_ERROR occur。
Thanks very much and I will do more test for this problem!
you can get more info the ROOM fun close() when to use.
Thank you!

from paho.mqtt.android.

hannesa2 avatar hannesa2 commented on August 15, 2024

Cool, when you test more !
Please use com.github.hannesa2:paho.mqtt.android:3.3.4.2 It comes with an update of Room.

Please ping me, when your tests are done and I'll merge #271 and I'll create 3.3.5 and drop 3.3.4.1 and 3.3.4.2. (These are tags based on a branch and I want to avoid this)

from paho.mqtt.android.

hannesa2 avatar hannesa2 commented on August 15, 2024

Sorry for the confusion but I changes version number immediate. I deleted 3.3.4.1 and 3.3.4.2
Please use 3.3.5-beta2 for your tests now.

This makes it more clear to be a temporary test release.

from paho.mqtt.android.

4563599 avatar 4563599 commented on August 15, 2024

Sorry for the confusion but I changes version number immediate. I deleted 3.3.4.1 and 3.3.4.2 Please use 3.3.5-beta2 for your tests now.

OK ths,

from paho.mqtt.android.

hannesa2 avatar hannesa2 commented on August 15, 2024

@sisier #272 is the same error with 3.3.5-beta2

Thanks very much and I will do more test for this problem!

@4563599 What's your observation ?

from paho.mqtt.android.

4563599 avatar 4563599 commented on August 15, 2024

@sisier #272 is the same error with 3.3.5-beta2

Thanks very much and I will do more test for this problem!

@4563599 What's your observation ?

the room database problem has not recurred. Probably you have solved this problem!Thank you very much!
Will a new version be released to replace this version 3.3.5-beta2?

from paho.mqtt.android.

sisier avatar sisier commented on August 15, 2024

@sisier #272 is the same error with 3.3.5-beta2

Thanks very much and I will do more test for this problem!

@4563599 What's your observation ?

No problem found at the moment, thank you 谢谢

from paho.mqtt.android.

4563599 avatar 4563599 commented on August 15, 2024

@sisier #272 is the same error with 3.3.5-beta2

Thanks very much and I will do more test for this problem!

@4563599 What's your observation ?

No problem found at the moment, thank you 谢谢

你是不是回复错了 你应该回复hannesa2 他解决的问题

from paho.mqtt.android.

hannesa2 avatar hannesa2 commented on August 15, 2024

Please try 3.3.5 if the errors still exists, please reopen this

from paho.mqtt.android.

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.