Open tilden opened 8 years ago
Can confirm here. Not entirely sure how to work around this.
In the case of Chris Lewis's "thin" watchface, there is no bug with the emu-app-config
command. If you install a compiled version of that app and run logs, you'll notice there's an error about Clay being included:
INFO:pypkjs.javascript.pebble:JS starting
[07:05:49] pkjs> JavaScript Error:
Error: Cannot find module 'clay'
at Object.loader.require (loader.js:67:11)
at _require.require (loader.js:55:48)
at Object.loader (src/js/app.js:3:12)
at _require (loader.js:58:10)
at Object.loader.require (loader.js:70:10)
at build/js/message_keys.json:12:14
at build/js/message_keys.json:13:5
at build/js/message_keys.json:14:3
If you fix the error by replacing clay
and config.json
with relative paths, ./clay
and ./config.json
, the project installs and runs correctly, and emu-app-config
works as expected.
I can try to reproduce the issue if this is not the resolution to your problem, but a minimal app that reproduces the issue would be needed to do that. @thirtythreeforty @tilden
Oh I see, so the problem is that the JS crashes due to the non-relative load path, and the Python that is expecting the JS to load finally times out? Funny that it would work on the phone but not on the emulator.
I will try that when I get home, thanks.
@cjwilliams Thanks for the response!
I hadn't thought to look at the logs for "Thin" because the logs came up blank when I encountered the same issue on my own watchface.
It turns out that if a face uses the classic appinfo.json format, JS package errors aren't shown in the logs for whatever reason. After converting my watchface to the new package.json format, I started getting errors that looked identical to the ones you found in Chris Lewis's face. Changing the paths to relative did indeed fix the issue! Thanks!
It seems that some change in the Pebble tool broke the
emu-app-config
function for faces withenableMultiJS
set totrue
. Faces and apps using the older style of Javascript do not appear to be affected.Steps to reproduce:
enableMultiJS
. For example, Chris Lewis's Thin face will work:git clone https://github.com/C-D-Lewis/thin.git
pebble build
pebble install --emulator=basalt
pebble emu-app-config
At least in my tests, it times out, giving the error:
However, if a pre-multi-js commit is checked out, this error doesn't occur:
git checkout 35c1f53b487ee54690ce42dc222f47a9ff5cea56
Build, install, and emu-app-config. It will correctly load the Dropbox-hosted config page.