10-20-2022 06:26 - edited 10-20-2022 09:32
10-20-2022 06:26 - edited 10-20-2022 09:32
Traced an error on the actual Versa original to this message:
"Unhandled exception: Error: failed to pre-parse snapshot" at (null):1,1
Before any console message appears in the log.
The initial screen loads but is not fully populated.
Does anyone know what this means?
App works correctly on a Versa 2.
It actually works fine in the 0.94 OS Simulator, so impossible to debug it.
Author | ch, passion for improvement.
10-20-2022 12:09
10-20-2022 12:09
Rebuilding will probably make this go away.
10-20-2022 12:23
10-20-2022 12:40
10-20-2022 12:40
I don't know for sure, but my understanding is that a clockface's code is converted into a 'snapshot' for quick loading and execution on the watch. I think it's like a memory image of the bytecode for the clockface. Read up on Jerryscript for more info.
My next guess is that, when the interpreter's run-time environment has to load the clockface, it pre-parses the snapshot to make sure it's valid. If the snapshot seems invalid, we get the message you quoted.
I don't know what can cause a snapshot to be unparseable. Since rebuilding the code often makes the problem go away, I assume it's a problem with the build process. If you can reproduce this problem, it must also be possible to produce an unparseable snapshot by having something problematic in your code. Since I've never been able to reproduce the issue, I don't know what that could be.
10-20-2022 12:54
10-20-2022 12:54
Based on this, maybe an unparseable snapshot could be created if it requires too much memory. But I'm pretty sure there can be other reasons.
10-21-2022 02:00
10-21-2022 02:00
Thank you @Gondwana - it is strange - have all sorts of other issues with 4.3 and Versa originals [pre Versa 2] since it was released.
The build process seems to produce completely different code, such that a program built with 4.2 and installed in production won't even install if built in 4.3 [with no source change]. Removing significant portions of the code it still fails with 4.3.
So this may be another of those issues.
Author | ch, passion for improvement.
10-21-2022 02:54
10-21-2022 02:54
@Gondwana Tried CLI SDK 4.2 with package.json
"devDependencies": {
"@fitbit/sdk": "^4.2.0",
"@fitbit/sdk-cli": "^1.7.0"
},
but the sideload reports the following :
manifest Version 6
sdk Version device Api 6.0.0
companion Api 3.3.0
so don't think SDK 4.2 is being used, anyway gives the same error as with 4.3.0
Author | ch, passion for improvement.