Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sideload of app failed

ANSWERED

I have a multi-language watchface that works fine in the simulator and downloaded to my watch from the gallery. However, in seeing if I could integrate kiezelpay, I found that adding the Internet and App Cluster Storage permissions causes me to get the "Sideload of app failed" message from the simulator and a hanging update for the watch from the gallery. This is before incorporating any of the kiezelpay code. If I check either Internet or App Cluster Storage, it still works fine. But when both are checked, I get the errors. I'm using about 58K of memory. My software itself doesn't use an internet connection or app cluster storage, but checking them causes the error. The error also happens if I integrate the kiezelpay software, which does use them.

 

The simulator log gives the following. The only promising information from it to me is the bundle_type->global_id_check error message, though I don't know what it means:

 

[D][10:32:34.135][] Developer bridge websocket connected

[D][10:32:35.007][] Sending notification of type: experimental.lifecycle.appRunning

[D][10:32:35.106][] Got protocol.serialization.change request

[D][10:32:37.449][] Got app.contents.stream.list request

[D][10:32:37.606][] Got app.install.stream.begin request

[D][10:32:37.770][] Got app.install.stream.finalize request

[A][10:32:37.771][] Error 3 at install step bundle_type->global_id_check

[A][10:32:37.771][] Installer error 3 for appid 0, client 255 with install status 27

[D][10:32:37.771][] Switcher_AppMgr: Received AppMgr message: subtype(9), application_id(127)

[E][10:32:37.771][] Error installing app: unkown error

[E][10:32:42.480][] Websocket peer initiated close - reason: Remote peer is going away

[E][10:32:42.481][] Developer bridge websocket closed (reason 1 code 1001)

[D][10:32:42.481][] Retrying developer bridge connection in 0 sec...

[A][10:32:42.481][] Connecting to "wss://027-v3-api-soa.fitbit.com:443/dbridge/"

[D][10:32:42.692][] Developer bridge websocket connected

[D][10:32:57.712][] Sending notification of type: experimental.lifecycle.appRunning

 

Has anyone seen this or have any suggestions?

 

 

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

I found my problem. If anyone supports multiple languages, this might help you!

 

I hadn't noticed that the kiezelpay software has some translations in the companion directory. They didn't cover some of my supported languages, and I didn't create translation files for those languages. That resulted in the sideload failure.

View best answer in original post

Best Answer
0 Votes
6 REPLIES 6

I found my problem. If anyone supports multiple languages, this might help you!

 

I hadn't noticed that the kiezelpay software has some translations in the companion directory. They didn't cover some of my supported languages, and I didn't create translation files for those languages. That resulted in the sideload failure.

Best Answer
0 Votes

Hello @NalokineGames ,

 

There was some discussion on this Is-anyone-using-i18n-I-had-a-problem-when-I-tried-to-use-it 

 

I found at least with my apps, Fitbit didn't respond well to having more than about 6 language files. It failed to load to the physical hardware, as your's did, with little explanation. 

 

The workaround I'm using is to have one language file each for the app and settings (called en-US.po in both). I find it makes it easier to manage the languages having them all in one place.

 

The code I use to access is:

 

import {gettext} from "i18n"

export function gText(T) {
  for (let x=0;x<3;x++) {
    var c = T + ([locale.language, locale.language.substr(0, 2), "en"])[x]
    var t = gettext(c)
    if (t != c) break
  }
  return t
}

 

An example of the K-pay end trial now button text from the en-US.po file is:

 

msgid "etNowde"
msgstr "Test jetzt beenden"
msgid "etNowes"
msgstr "Finalizar prueba ahora"
msgid "etNowfr"
msgstr "Fin du procès maintenant"
msgid "etNowit"
msgstr "Termina prova ora"
msgid "etNowja"
msgstr "試用を今すぐ終了"
msgid "etNowko"
msgstr "시험판 종료"
msgid "etNowms"
msgstr "Ujian Akhir Sekarang"
msgid "etNownl"
msgstr "Einde proef nu"
msgid "etNowsv"
msgstr "Avsluta rättegången nu"
msgid "etNowzh"
msgstr "现在结束审判"
msgid "etNowzh-TW"
msgstr "現在結束審判"
msgid "etNowen"
msgstr "End Trial Now"

 

The code to show/hide an 'end trial' toggle is:

 

{ endTrialVisible && <Toggle settingsKey="kpayPurchase" label={ gText("etNow") } /> }

 

 

My answer to the Kpay translations is I took them over and provided translations myself. This was required at the time as my app actually predated their going multi-lingual.

 

The result is an app that is easy to maintain and supports the 11 languages Fitbit uses (plus Malay). When I add a setting, I only have to edit one file, not 11; all my changes are in one place, in one file.

 

Regards,

Reign

Best Answer
0 Votes

Thanks. I will try that. It turns out I was too optimistic in thinking I had solved my problem. When I made the changes and it worked, apparently I still had Internet unchecked. The weird thing to me is that it loads and works fine with the multiple language files unless I have both Internet and App Cluster Storage checked.

Best Answer
0 Votes

Hello @NalokineGames ,

 

I occasionally run into this problem too, the problem with communications is all the content moves through memory, which in javaScript is limited.

 

You may need to do some optimization.

 

Let me add that Fitbit does do a really good job at minifying code so that more will fit, but variables passing between the GUI, the app, and the settings do not get minified, unless the author explicitly shortens the variable names themselves.

 

Regards,

Reign

Best Answer
0 Votes

I did finally figure out how to "solve" my problem, and it was related to languages. I'm supporting nine languages right now, in addition to English. If I uncheck one of the languages (doesn't matter which) in the package.json file, the sideload problem disappears. It looks like even if I uncheck a given language, the watch will still use my translations for that language. I guess I just can't do a query for the name in that language?

 

I really like the idea of creating a single translations file and selecting the language in the settings, as it gives the ability to support additional languages. I imagine there's a memory cost, though, assuming that the system would normally just read the .po file for the current language.

Best Answer
0 Votes

@NalokineGames wrote:

I did finally figure out how to "solve" my problem, and it was related to languages. I'm supporting nine languages right now, in addition to English. If I uncheck one of the languages (doesn't matter which) in the package.json file, the sideload problem disappears. It looks like even if I uncheck a given language, the watch will still use my translations for that language. I guess I just can't do a query for the name in that language?

 

I really like the idea of creating a single translations file and selecting the language in the settings, as it gives the ability to support additional languages. I imagine there's a memory cost, though, assuming that the system would normally just read the .po file for the current language.


I ran into this same problem with the same symptoms, except my limit was 6. Currently I support all 11, and I just added Russian, Czech, Polish, Romanian, Polish, Portuguese, Indonesian and Malaysia (in Beta). You are right, I think it works best when selected from the settings. The trick is to get it to default to the current locale.language on init and on change.

 

*****

 

There is a memory cost, but the po files are in app memory, which is relatively large. If you have a problem with that, the compiler will warn you about the Versa-Lite size first (as it is the smallest). Multiple languages does not appear to affect the JavaScript memory in any noticeable way.

 

My app en-US.po is 18kb and my settings en-US.po is 65kb.

 

BTW I learned about the Versa-Lite limit by hitting it.

Note: do not include work-in-progress files in your resource directory, they will be downloaded even if not used or referenced.

 

Regards,

Reign

Best Answer
0 Votes