Symbol Not Found Error

Former Member
Former Member
Hello,

my app was developed for CIQ v.1.2, now I'm trying to make sure it runs properly on newer CIQ versions, I'm not sure if I can take backward compatibility for granted?

I needed to change the signatures of the App.AppBase methods onStart and onStop, to include an event argument. So, my app now runs on the Vivoactive HR simulator, but not on the Edge simulators. There I get the error which I pasted below, along with the whole log from the simulator console.

Could anyone give me a hint what could be causing this problem, and how can I fix it? Thanks!

Found Transport: tcp
Connecting...
Connecting to device...
Device Version 0.1.0
Device id 1 name "A garmin device"
Shell Version 0.1.0
Symbol Not Found Error
Connection Finished
Closing shell and port
  • normally you have this more the other way round, a symbol not found error occurs when using a variable name that was not defined (you may want to check your casings of your var names) or when using a function from a module that does not exist (eg using Math.round() on a ciq1.2 platform).

    I have no knowledge of methods that existed in Ciq 1.2 that no longer exist in newer versions though...

    Check your if / else branches, maybe you're coming in other sections?

    To debug: add System.println("some debug text"); at strategic places to find the occurence of the error.
  • Mostly undefined variables (typos, or missed scope of view) cause such errors.
    But some strange cases can occur.
    I have 2 examples from my experience:
    - Use makeWebRequest without proper checks on epix causes crash Symbol not found. Epix has CIQ VM 1.2, which does not support this function in Communication module.
    I solved it by using following safe code:
    if (Comm has :makeWebRequest ) {
    Comm.makeWebRequest(
    url, params, options, method(:onReceive)
    );

    }
    else {
    Comm.makeJsonRequest(
    url, params, options, method(:onReceive)
    );
    }

    - Data fields cannot use Toybox.Position module and all constants from there.
    But constant Position.QUALITY_NOT_AVAILABLE is necessary to determine accuracy in compute() function. You can see below I used println at any function call, because code crashed every time entering compute().
    That is why I replaced constant to 0 when compare accuracy.
    function compute(info) {
    // See Activity.Info in the documentation for available information.
    //Sys.println("Activity.Info enter");
    if(info has :currentLocation){
    //Sys.println("currentLocation");
    if(info.currentLocationAccuracy != 0 ){ // Position.QUALITY_NOT_AVAILABLE
  • Former Member
    Former Member over 8 years ago
    To debug: add System.println("some debug text"); at strategic places to find the occurence of the error.


    That's what I did right away, before I wrote, but the confusing thing is that the code does not get executed, the failure seems to occur before any of my println statements are reached. And they are at the very beginning of my app:

    class MyApp extends App.AppBase {

    function initialize() {
    Sys.println("...INIT");
    ...
    }

    and

    function onStart(state) {
    Sys.println("...START");
    }



    None of these println gets executed. What could be wrong?!
  • I've experienced this same issue. The very first println in the app was not being executed and I was getting the same error you show.

    This occurred when I copied an existing App and cut a bunch of stuff out of it. I ended up deleting the app, making a new copy of the existing app, deleting the same stuff, and then it worked. I never identified the root cause though.

    It seemed like something got corrupted rather than a code bug but I can't say for certain.
  • Former Member
    Former Member over 8 years ago
    I've experienced this same issue. The very first println in the app was not being executed and I was getting the same error you show.

    This occurred when I copied an existing App and cut a bunch of stuff out of it. I ended up deleting the app, making a new copy of the existing app, deleting the same stuff, and then it worked. I never identified the root cause though.

    It seemed like something got corrupted rather than a code bug but I can't say for certain.


    Thanks for the hint.

    What confuses me is that the app works fine when I start it on one simulator (Vivoactive HR) and not on another (such as Edge 1000). For both simulators I'm selecting the same SDK version, and still it works only on one and not on the other. What could be the problem? Is there maybe something Edge specific which I'm missing?

    Thank you for any help!
  • For both simulators I'm selecting the same SDK version, and still it works only on one and not on the other. What could be the problem?


    When you say "both simulators", do you mean the came copy of the simulator, but just picking a different target? (same SDK used for the build, etc)
    Are you saying you change the target SDK when you run? If so, just let them default for both devices. (they are 2.1.x for both with the 2.2.4 SDK)

    I dont think companion apps work with the edge if you're doing that (based on your other posts), as in the 2.2.2 SDK change log there is this:
    Remove support for communicating with the mobile Connect IQ SDK in the API for Edge, Oregon, and Rino devices.
  • Former Member
    Former Member over 8 years ago
    When you say "both simulators", do you mean the came copy of the simulator, but just picking a different target? (same SDK used for the build, etc)
    Are you saying you change the target SDK when you run? If so, just let them default for both devices. (they are 2.1.x for both with the 2.2.4 SDK)

    I dont think companion apps work with the edge if you're doing that (based on your other posts), as in the 2.2.2 SDK change log there is this:
    Remove support for communicating with the mobile Connect IQ SDK in the API for Edge, Oregon, and Rino devices.


    Thank you Jim, that's right on the spot.

    The absence of the Communication API is causing the failure. Yes, I was testing with the same simulator, just with a different target.