Acknowledged

Bug: makeWebRequest returns UNKNOWN_ERROR when in simulator media mode Sync

System:

Ubuntu 22.10
Visual Studio Code v1.73.1
Monkey C extension v1.0.7
SDK v4.1.6

A makeWebRequest does a callback with responseCode 200 and data is some dictionary from the server json. When starting the Media Mode -> Sync from the menu, the exact same makeWebRequest does a callback with responseCode 0 and data is null. The same bahaviour occurs when called from a Media.SyncDelegate derived class, or a Communications.SyncDelegate derived class.

This means I cannot test the SyncDelegate code in the simulator and thus I am unable to post any updates to my app. How can this be resolved?

  • CIQ Developer comment: 

    "I was not able to reproduce the problem described by the user. However, it appears there's issue with user's code where d_todo is defined at multiple places including in global space which led to a "symbol not found error" when invoking AudioSync::initialize() since it's trying to resolve it to the one defined in SongStore.mc. I renamed the one in SongStore.mc to something else, then I was able to run in sync mode without any issues with both 4.1.6 and 4.1.7 SDKS. I tested with 4 media modes, it worked fine."

  • I also get 404 not found responses when 'Use Device HTTPS settings' is enabled. After disabling the option, responses from the app mode work fine. However, in Sync mode, responses are all UNKNOWN_ERROR 0.

    Is it possible that there have been changes in the simulator network stack when used from Sync mode?

  • The last version I updated is mostly working correctly in the Connect IQ app store. I only received the exact same report from the fenix 7x device (network is working throughout the app, but when starting the sync, SDK error 0 is returned (https://github.com/memen45/SubMusic/issues/60#issue-1419302520). The issue was introduced after updating to 4.1+ sdk version for the build. I have tried to revert to building the app with pre 4.1, but it is not working (visual studio code extension requires 4.1.6 to work).

    It is indeed an Audio Content Provider app, the code can be checked here: https://github.com/memen45/SubMusic

    Relevant notes and code locations:

    1. makeWebRequest is inside a function in the Api class here
    2. The same function can be in two different call stacks, either:
        called from Provider here
        called from PlaylistSync here
        called from Syncer here
        called from Syncer onStartSync here
        which is called from the SyncDelegate onStartSync method like here (SyncDelegate can be derived from Media or Communications.SyncDelegate, both do not work)

        or:
        called from Provider here
        called from Menu SongsRemote here
        ...
        called from AudioContentProviderApp here
    3. The latter call stack is working correctly, menus are showing all the information etc. The SyncDelegate call stack is not working and returns immediately with responsecode 0 in the simulator.

    Since 4.1 SDK I have turned off type checking. Also, I have seen HTTPS issues before with fenix 7x or other new devices, but never in the simulator. I have turned off the 'Use Device HTTPS requirements' option, as otherwise everything returns 404.

    Hope the above helps a bit!

  • We have so far been unable to produce this. Is the same code working as you expect on a physical device? Is your app an audio content provider app? Would you be able to provide some example code of the relevant areas?