Cordova/Meteor3: is not a function or its return value is not iterable

Hi,

With Meteor 3-rc1, I am trying to have my App running on Android Emulator in development mode.

I use:

  • vue,
  • vuetify,
  • jorgenvatle:vite-bundler

I am to build the android app (apk) for production and everything works fine.

The issue is when I try to do

meteor run android

I have the following error in the console:

"Uncaught TypeError: priorities.values is not a function or its return value is not iterable",

Looking at the Vuetify code, priorities is defined as new Map()
going one step further, it seems to have an issue around Symbol

on the other hand

meteor run android --production

works perfectly, no problem also on a browser.

it seems to have similarities with the following messages

Does anyone have any ideas on how to move towards resolution?

Thanks.

Hi @harry73,

It seems very much similar to those 2 threads.

From our current understanding, when Meteor builds the cordova bundles, it builds it in a “legacy” mode to support older devices.

The problem is with ecmascript-runtime-client, a module used by Meteor (so not in your project but in your Meteor installation), it does override Map.prototype.entries() and other functions to make them compatible with older devices.

The problem with newer scripts is that the Map (and maybe Array as well) should return iterables but they do not. So it breaks other external scripts.

We have seen 2 ways forward:
1-Modify Meteor do make it build cordova’s bundle using a modern mode
2-Modify ecmascript-runtime-client to stop overriding those objects

So far, we have only spent around 1h to test each solution but to no avail.

We’ve been offered help from Quave (a developer company that specializes in Meteor dev, where the previous CEO of Meteor now works). We have not had time to work further with them or to approve the project yet because we’re working full time on finding a workaround to our problem with Google Maps that’s going to hit in a couple of days.

Our current ‘workaround’ is that our Cordova app is going to open an InappBrowser to load the google maps. So it’s similar to using an iFrame to load a second instance of the app. yeah, it’s beautiful ;-). Since the InAppBrowser loads a web.browser (modern) bundle instead of the legacy one.

Seriously, it seems like a big job deep inside Meteor to make this work. We don’t know yet what we’re going to do.

We’d obviously like Metor’s team to jump in but I understand they are very busy with Meteor 3.0/fiberfree

Regards,

Burni13

Hi @burni13

Thanks for your answer.

I am not an expert but what’s weird for me it is that it works for meteor build (APK) and meteor run android --production but not with meteor run android

Regards,