App source not found

Posted on
  • I'm trying to test a clock on the bangle 2. I have followed the steps to fork the app loader, and have a working version; I can upload an existing clock from this version to the Bangle and it works once loaded, so the actual forked loader seems to be working.

    • I have my own code in the folder /apps/tapclok, in the file /apps/tapclok/app.js.
    • The code works in the emulator, so it's probably not broken!
    • The icon (set up according to https://www.espruino.com/Bangle.js+App+Loader) is in /apps/tapclok/app-icon.js.
    • The following has been added to /apps.json at root (after a comma to split it from the previous one):

      { "id": "tapclok",
      "name": "Tap Clock",
      "shortName":"Tap Clock",
      "version":"0.01",
      "description": "A simple analogue clock - tap the watch to switch temporarily to a digital format with seconds and date",
      "icon": "tapclock.png",
      "type": "clock",
      "tags": "clock",
      "supports" : ["BANGLEJS2"],  
      "readme": "README.md",
      "storage": [
        {"name":"tapclock.app.js","url":"app.js"},
        {"name":"tapclock.img","url":"app-icon.js","evaluate":true}
      ]
      }
      

    When I upload the clock, and try to launch it, I get the message 'App source not found', and there is no icon next to the name in the list of applications.

    I must have missed a step somewhere! What's gone wrong?

    (And does the seven character limit still apply? Some other apps don't seem to respect it!)

  • Could it be "id": "tapclok", - did you mean "id": "tapclock"?

  • I assumed that had to match the folder name - and that's where the seven character limit impacted (the 'c' was sacrificed!).

    Should it perhaps match the file names in 'storage' instead (or as well)?

    If the seven character limit no longer applies I'll make folder, id and storage locations consistently 'tapclock'.

  • Ahh, ok - yes you're right the ID should match the folder name, sorry - missed that.

    Where did you read about the 7 character limit? We raised it to 28 a while back so if it's still mentioned in a tutorial somewhere I need to change that.

    Are you hosting on GitHub pages? If so please could you share a link so I can take a look? If you're self-hosting it could be that the permissions on the new directory/files are wrong so the webserver can't read them. Maybe try opening your_server/apps/tapclok/app.js in the web browser and see if it works

  • The seven character limit is on the github ReadMe (https://github.com/espruino/BangleApps) under 'Example Apps'. It does say 28 characters further up the page, though, so that's my memory!

    My version is at https://github.com/daldred/BangleApps .

    I tried going to https://github.com/daldred/BangleApps/apps/tapclok/app.js, and got a 'not found' error. However I also get that error also happens if I go to https://github.com/daldred/BangleApps/apps/boldclk/bold_clock.js, which is the path to the Bold Clock app file - and the Bold clock is the one that loaded onto the Bangle from this source and works without an issue.

  • Thanks - I'll tweak that :)

    How are you loading the clock? I notice the URLs you give are from the GitHub rather than GitHub pages... I just tried an upload of tapclock from:

    https://daldred.github.io/BangleApps/

    And while it doesn't work for me, the upload does seem to go without a hitch

  • Also the app.js works fine at that URL https://daldred.github.io/BangleApps/apps/tapclok/app.js

  • Ok, I just renamed the folder to 'tapclock' (just to neaten things up without the 7-char limit) and it works - well, it uploads and the basic clock face loads! So no idea what was happening yesterday. Now I just need to work out why the tap doesn't, and improve the face which looks less clear on the actual watch than in the emulator.

    I've still got the old version showing up in the app list, though, and it still says 'app source not found' if I select that one. Presumably the only way to get rid of it is to use 'remove all apps' and reload the ones I want?

  • Presumably the only way to get rid of it is to use 'remove all apps'

    I'm surprised you can't just click remove on that app, but if it doesn't work you can still go into the Web IDE, click the 'storage' icon and delete the old files manually

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

App source not found

Posted by Avatar for daldred @daldred

Actions