strukturart / bHacker-store-client

KaiOS
MIT License
38 stars 6 forks source link

Incompatible Data, try updating the app #71

Open dcowan-london opened 3 years ago

dcowan-london commented 3 years ago

When I try to launch the Store, I get a banner at the top of the screen saying "Incompatible Data, try updating the app". This also appears in the WebIDE console.

dcowan-london commented 3 years ago

69

vlycop commented 3 years ago

hello :) Same exact issue here on a new Nokia 2720 Flip :) a couple of reboot didn't do much sadly

Unixware commented 3 years ago

same issues, no matter : reboots/reinstalls

dcowan-london commented 3 years ago

Hey, The reason this error is appearing is because the application is expecting the store version (from the server - https://banana-hackers.gitlab.io/store-db/data.json) to be 2 (https://github.com/strukturart/bHacker-store-client/blob/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/js/backend_api.js#L50) - and it seems to be 3.

dcowan-london commented 3 years ago

Also, second mirror (https://github.com/strukturart/bHacker-store-client/blob/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/js/backend_api.js#L6) is very broken - last actual commit was 30 October 2020 (https://github.com/bananahackers/bananahackers.github.io/commit/296fa35e33b6576bab8741dc6dcf75a1066b6896)

Unixware commented 3 years ago

good points mate.

dcowan-london commented 3 years ago

So here's what I've found:

After changing the 2 to a 3 (https://github.com/strukturart/bHacker-store-client/blob/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/js/backend_api.js#L50), at first, everything seems to work.

When I try installing an app, however, it just sits there with a loading bar at the top forever. Nothing appears in the WebIDE console.

The issue seems to be that navigator.mozApps.mgmt.import() (which the store uses to install the package - https://github.com/strukturart/bHacker-store-client/blob/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/js/install.js#L87) doesn't exist (TypeError: navigator.mozApps.mgmt.import is not a function), but still, for some reason, doesn't fail the error check (https://github.com/strukturart/bHacker-store-client/blob/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/js/install.js#L65) - it just aborts at that point.

I tried enabling the experimental alternative installation method (https://github.com/strukturart/bHacker-store-client/blob/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/js/install.js#L73). The error I got back was:

{"isTrusted":true}

I've never done anything like this before, and there's very little documentation for any of this online (all the Mozilla documentation for FirefoxOS has been taken down, and from the archives I can find, there seem to have been changes made to KaiOS, so it's not quite compatible), so there's not much else I would know to try.

What I think is most likely, is that a recent update to KaiOS broke the installation method the store was relying on.

It is possible that it might work on other KaiOS phones - all this was done on a Nokia 8000 4G.

dcowan-london commented 3 years ago

Update: I've just tried it in the KaiOS emulator (stock, with just the store version changed), and got this error - https://github.com/strukturart/bHacker-store-client/blob/97a416036e154a558f73a3cabb1d70bf0c066150/application/assets/js/install.js#L108