Coder Social home page Coder Social logo

Comments (5)

Meiguro avatar Meiguro commented on July 23, 2024

Thanks for reporting the issue! Is your project a multi-file js project? Can you post all the invocations of require with their respective file and call order? I will try to reproduce the issue tonight.

from pebblejs.

mihirt avatar mihirt commented on July 23, 2024

Nope, i'm just using app.js. No other js dependencies. If you'd like, my dependencies are shown here. However, this issue also occurred for me when trying to build and install a clone of this repository (unmodified).

from pebblejs.

Meiguro avatar Meiguro commented on July 23, 2024

I've not been able to reproduce the issue using commit f21c51e which is tip as of now. This is not to say there is no solution, I definitely want to work with you until this problem is resolved because it's important to get rid of bugs. It just seems like this is a simple error caused by a bad non-working commit, except that I've been unable to reproduce the problem. If that's the kind of issue you're running into, I am simply missing one extra trigger condition.

In any case, thanks for trying the unmodified repository! In my experience, Android likes to aggressively cache the JavaScript. To kill the cache, unload the app from your watch. It'll be the one that appears as "Simply.js" since I've not yet fully developed the local development experience with regards to the app UUID. Use pebble clean build and try to install the unmodified pebble.js again.

If it's not an Android cache issue, just to be sure, is the clone also commit f21c51e? As a paranoid check, you can make sure the folder and files src/js/clock, src/js/clock/clock.js, and src/js/clock/index.js exist. If they don't exist, there's something fishy. Chances are, they exist however.

Does the issue also occur with pebble install --emulator=aplite --logs? This definitely would not involve an Android cache.

Finally, try placing the code snippet for (var path in __loader.packages) { console.log(path); } as the first line of app.js. It will print all available packages. You should see clock.js in there. I would also like to see the full output of that in order to get a closer look at what's going on. (For posterity, __loader is undocumented because its API is not guaranteed. It should only be accessed for debugging.)

from pebblejs.

mihirt avatar mihirt commented on July 23, 2024

Just tested this out with unloading the app. I did pebble clean then pebble build, and now the app works!
I think my problem was that I updated the Pebble app (after about 2 months), the watch software, and my SDK on the same day without reloading anything, causing Android to use the cached javascript and not locate Clock.
Also, does the emulator only run in SDK 3?

On Mar 23, 2015, at 2:28 AM, Meiguro [email protected] wrote:

I've not been able to reproduce the issue using commit f21c51e f21c51e which is tip as of now. This is not to say there is no solution, I definitely want to work with you until this problem is resolved because it's important to get rid of bugs. It just seems like this is a simple error caused by a bad non-working commit, except that I've been unable to reproduce the problem. If that's the kind of issue you're running into, I am simply missing one extra trigger condition.

In any case, thanks for trying the unmodified repository! In my experience, Android likes to aggressively cache the JavaScript. To kill the cache, unload the app from your watch. It'll be the one that appears as "Simply.js" since I've not yet fully developed the local development experience with regards to the app UUID. Use pebble clean build and try to install the unmodified pebble.js again.

If it's not an Android cache issue, just to be sure, is the clone also commit f21c51e f21c51e? As a paranoid check, you can make sure the folder and files src/js/clock, src/js/clock/clock.js, and src/js/clock/index.js exist. If they don't exist, there's something fishy. Chances are, they exist however.

Does the issue also occur with pebble install --emulator=aplite --logs? This definitely would not involve an Android cache.

Finally, try placing the code snippet for (var path in __loader.packages) { console.log(path); } as the first line of app.js. It will print all available packages. You should see clock.js in there. I would also like to see the full output of that in order to get a closer look at what's going on. (For posterity, __loader is undocumented because its API is not guaranteed. It should only be accessed for debugging.)


Reply to this email directly or view it on GitHub #40 (comment).

from pebblejs.

Meiguro avatar Meiguro commented on July 23, 2024

Glad it's fixed for you! Yes, the emulator was recently introduced in SDK 3.

from pebblejs.

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.