isleofcode / ember-cordova-platform Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
WARNING: [DEPRECATION] [DEPRECATION] Usage of the Ember Global is deprecated. You should import the Ember module or the specific API instead.
See https://deprecations.emberjs.com/v3.x/#toc_ember-global for details.
Usages of the Ember Global may be caused by an outdated ember-cli-babel dependency. The following steps may help:
Prior to v7.26.6, ember-cli-babel sometimes transpiled imports into the equivalent Ember Global API, potentially triggering this deprecation message indirectly, even when you did not observe these deprecated usages in your code.
I tested to get the version on Android 4.4, 5.0 and 8.0 - looks like, I couldn't get it on any of them. window.device
is undefined in all of them which leads to an undefined version as well. Maybe a ua parser library could help here for better results?
When trying to serve an Ember Fastboot app which also uses Corber, the following error is thrown:
ReferenceError: navigator is not defined
at Module.callback (/Users/Lou/Sites/prog/dist/assets/addon-tree-output/ember-cordova-platform/services/ember-cordova/platform.js:31:1)
at Module.exports (/Users/Lou/Sites/prog/dist/assets/vendor/loader/loader.js:106:1)
at Module._reify (/Users/Lou/Sites/prog/dist/assets/vendor/loader/loader.js:143:1)
at Module.reify (/Users/Lou/Sites/prog/dist/assets/vendor/loader/loader.js:130:1)
at Module.exports (/Users/Lou/Sites/prog/dist/assets/vendor/loader/loader.js:104:1)
at requireModule (/Users/Lou/Sites/prog/dist/assets/vendor/loader/loader.js:27:1)
at Class._extractDefaultExport (/Users/Lou/Sites/prog/dist/assets/addon-tree-output/ember-resolver/resolvers/classic/index.js:410:1)
at Class.resolveOther (/Users/Lou/Sites/prog/dist/assets/addon-tree-output/ember-resolver/resolvers/classic/index.js:110:1)
at Class.superWrapper (/Users/Lou/Sites/prog/dist/assets/ember-utils.js:428:1)
at Class.resolve (/Users/Lou/Sites/prog/dist/assets/ember-application/system/resolver.js:133:1)
at _resolve (/Users/Lou/Sites/prog/dist/assets/container.js:878:1)
at Registry.resolve (/Users/Lou/Sites/prog/dist/assets/container.js:581:1)
at Registry.resolve (/Users/Lou/Sites/prog/dist/assets/container.js:585:1)
at _has (/Users/Lou/Sites/prog/dist/assets/container.js:895:1)
at Registry.has (/Users/Lou/Sites/prog/dist/assets/container.js:631:1)
at Registry.validateInjections (/Users/Lou/Sites/prog/dist/assets/container.js:821:1)
at FactoryManager.create (/Users/Lou/Sites/prog/dist/assets/container.js:399:1)
at instantiateFactory (/Users/Lou/Sites/prog/dist/assets/container.js:268:1)
at _lookup (/Users/Lou/Sites/prog/dist/assets/container.js:226:1)
at Container.lookup (/Users/Lou/Sites/prog/dist/assets/container.js:78:1)
at Class.lookup (/Users/Lou/Sites/prog/dist/assets/ember-runtime/mixins/container_proxy.js:23:1)
at Class.<anonymous> (/Users/Lou/Sites/prog/dist/assets/ember-routing/system/route.js:115:1)
at ComputedPropertyPrototype.get (/Users/Lou/Sites/prog/dist/assets/ember-metal.js:4067:1)
at get (/Users/Lou/Sites/prog/dist/assets/ember-metal.js:3439:1)
at Class._getQPMeta (/Users/Lou/Sites/prog/dist/assets/ember-routing/system/router.js:601:1)
at Class._queryParamsFor (/Users/Lou/Sites/prog/dist/assets/ember-routing/system/router.js:617:1)
at forEachQueryParam (/Users/Lou/Sites/prog/dist/assets/ember-routing/system/router.js:1159:1)
at Class._deserializeQueryParams (/Users/Lou/Sites/prog/dist/assets/ember-routing/system/router.js:517:1)
at getFullQueryParams (/Users/Lou/Sites/prog/dist/assets/ember-routing/system/route.js:1274:1)
at getQueryParamsFor (/Users/Lou/Sites/prog/dist/assets/ember-routing/system/route.js:1286:1)
at Class.paramsFor (/Users/Lou/Sites/prog/dist/assets/ember-routing/system/route.js:284:1)
at Class.deserialize (/Users/Lou/Sites/prog/dist/assets/ember-routing/system/route.js:945:1)
at applyHook (/Users/Lou/Sites/prog/dist/assets/router.js:211:1)
at UnresolvedHandlerInfoByParam.runSharedModelHook (/Users/Lou/Sites/prog/dist/assets/router.js:662:1)
at UnresolvedHandlerInfoByParam.getModel (/Users/Lou/Sites/prog/dist/assets/router.js:896:1)
at tryCatcher (/Users/Lou/Sites/prog/dist/assets/rsvp.js:200:1)
at invokeCallback (/Users/Lou/Sites/prog/dist/assets/rsvp.js:372:1)
at publish (/Users/Lou/Sites/prog/dist/assets/rsvp.js:358:1)
at /Users/Lou/Sites/prog/dist/assets/ember-testing/ext/rsvp.js:14:1
at invokeWithOnError (/Users/Lou/Sites/prog/dist/assets/backburner.js:214:1)
at Queue.flush (/Users/Lou/Sites/prog/dist/assets/backburner.js:125:1)
at DeferredActionQueues.flush (/Users/Lou/Sites/prog/dist/assets/backburner.js:278:1)
at Backburner.end (/Users/Lou/Sites/prog/dist/assets/backburner.js:410:1)
at Timeout.Backburner._boundAutorunEnd [as _onTimeout] (/Users/Lou/Sites/prog/dist/assets/backburner.js:372:1)
at ontimeout (timers.js:466:11)
at tryOnTimeout (timers.js:304:5)
at Timer.listOnTimeout (timers.js:267:5)
It seems that this issue relates to the use of navigator
when serving the app using node: ember-fastboot/ember-cli-fastboot#104
It looks like the simple fix is to guard against accessing navigator if FastBoot is in use, however, looking at the service, it seems all of the code assumes access to navigator
to determine the user agent...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.