SymbolNotFound at return statement

Hello everyone!

I have a simple code where i return an attribute of a class:

    function getFont(f) {
        if (mCurrentFontIdx != f || mFont == null) {
            // free memory used by prev cached font
            mFont = null;
            mFont = WatchUi.loadResource(mFontList[f]);
            mCurrentFontIdx = f;
        }
        return mFont;
    }

ERA reports two errors on "return" statement:

  • Symbol Not Found Error
  • Too Many Arguments Error

I can't reproduce it on my device and in simulator.

What could it be and how to fix/workaround it?

  • What device does the affected user have, what firmware version, and what SDK did you build the app with?

  • I'm buildin app with 3.1.6;

    Error Name: Too Many Arguments Error
    Occurrences: 15
    First Occurrence: 2019-10-26
    Last Occurrence: 2019-11-03
    Devices:
        fēnix® 6 Pro / 6 Sapphire: 3.00
    App Versions: 1.7.1
    Languages: deu, eng
    Backtrace:
        HandView.getFont:130

    Error Name: Symbol Not Found Error
    Occurrences: 69
    First Occurrence: 2019-10-26
    Last Occurrence: 2019-11-03
    Devices:
        fēnix® 6 Pro / 6 Sapphire: 2.20
        vívoactive® 4: 3.40, 2.70
        vívoactive® 3: 6.60
    App Versions: 1.7.1
    Languages: deu, dut, eng, ita, rus, spa
    Backtrace:
        HandView.getFont:130

  • Ugh. Unfortunately, this is the problem I expected..

    There was a change that went in to the 3.1.4 SDK that will cause problems if the app is build for 3.1.4 or later and is run on a device that does not have support for the 3.1.4 (or later) SDK.

    There are supposed to be checks in place that prevent apps downloading to a device that doesn't have the firmware support needed to run it. Unfortunately, those checks are missing/broken and that is causing this problem for a lot of developers/users.

    For now the solution is to tell users to update their firmware (fenix6 4.0.0, vivoactive4 3.1.4, vivoactive3 6.9.0).

  • Thank you for clarification!

    Looks like this should be in FAQ section at application page. O even in developer FAQ.

  • Does this affect Edge devices as well, or just watch devices?

  • It affects any device where the SDK used to build the application indicates 3.1.4 or later support (look for connectIQVersion in devices.xml for the SDK you're building with) and the device the software is installed on does not have 3.1.4 support.

    It is my understanding that as of the 3.1.6 SDK this affects the fenix6 family, marq family, vivoactive3 family, vivoactive4 family and venu devices at this time. There is a chance it would also affect the edge520plus and edge820.

  • Thanks Travis, I'll keep an eye out.