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

setConfiguration causes crash #1838

Open
JuliusFruitfly opened this issue Sep 9, 2024 · 7 comments
Open

setConfiguration causes crash #1838

JuliusFruitfly opened this issue Sep 9, 2024 · 7 comments
Assignees
Labels

Comments

@JuliusFruitfly
Copy link

Hi,
I'm using the setConfiguration command over MQTT to change monitoring mode (move/significant) and the moveModeLocatorInterval timer to optimise battery use. For example slow updates at night and faster updates when moving.

This often causes owntracks to crash.

On a restart I see entries in the log such as:-

[main] App: Historical process exit reason: 2 - Description:
[main] App: Historical process exit reason: 2 - Description:
[main] App: Historical process exit reason: 13 - Description: OneKeyClean
[main] App: Historical process exit reason: 2 - Description:
[main] App: Historical process exit reason: 3 - Description:
[main] App: Historical process exit reason: 4 - Description: crash
[main] App: Historical process exit reason: 2 - Description:
[main] App: Historical process exit reason: 3 - Description:
[main] App: Historical process exit reason: 2 - Description:
[main] App: Historical process exit reason: 2 - Description:

I'd appreciate some clues as to where I'm going wrong,

Thanks

  • App build number: 2.5.0
  • Android version: 14
  • Device: Xiaomi/Redmi Note 12
  • Installation source: Google Play
@jpmens
Copy link
Member

jpmens commented Sep 9, 2024

Please show us exactly how to reproduce the crash, i.e. the command you use to publish and the payload.

@jpmens jpmens added the needs-more-info A little more info requested from the submitter label Sep 9, 2024
@JuliusFruitfly
Copy link
Author

JuliusFruitfly commented Sep 10, 2024 via email

@JuliusFruitfly JuliusFruitfly closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2024
@JuliusFruitfly
Copy link
Author

Crash probably not directly related to setConfiguration, so closing pending better analysis. Thanks for your help

@JuliusFruitfly
Copy link
Author

JuliusFruitfly commented Oct 1, 2024

I'm reopening this issue as I have more context.
(Note: now on 2.5.3)

In summary:
Owntracks seems to disconnect MQTT on a config update, then exits on a second update when a location update triggers a reconnect.


Timeline is:-

20:48:57 Owntracks reconnects to MQTT

21:41:53 setConfiguration used to update parameters:
{'monitoring': 2, 'locatorDisplacement': 50, 'moveModeLocatorInterval': 60, 'locatorPriority': 3}
This causes owntracks to disconnect MQTT

23:13:54 Owntracks reconnects MQTT and sends a location update

setConfiguration used again:
{'monitoring': 1, 'locatorDisplacement': 200, 'locatorInterval': 1800, 'locatorPriority': 2}

Owntracks exits.

When restarted Owntracks log contains:
App: Historical process exited at 2024-09-28T23:10:05.300Z. reason:
(no reason given)


I've attached the config - there's nothing of interest in the log.

Thanks for your help

config NS crash 2809.json

@JuliusFruitfly JuliusFruitfly reopened this Oct 1, 2024
@growse
Copy link
Collaborator

growse commented Oct 2, 2024

That's... Weird. Neither of those two things should happen.

Some config changes cause an MQTT reconnect (usually the ones related to the connection), but not those.

Will try and reproduce. Hopefully it's something simple to fix.

@growse growse added bug and removed needs-more-info A little more info requested from the submitter labels Oct 2, 2024
@growse growse self-assigned this Oct 2, 2024
@JuliusFruitfly
Copy link
Author

I have modified my app to notify me of a disconnect after a config update. If this works I'll send the log. Usually exits every few days.

@JuliusFruitfly
Copy link
Author

The MQTT disconnect maybe part of the cause of the owntracks 'exit' , but it is not a bug of itself. The disconnect is generated by the MQTT server or the home assistant integration. Possibly the HA integration doesn't like seeing the setConfiguration cmd.

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