Giter Site home page Giter Site logo

ember-cordova-platform's People

Contributors

alexblom avatar ember-tomster avatar lougreenwood avatar

Watchers

 avatar  avatar  avatar

ember-cordova-platform's Issues

Ember Global Deprecation Warning

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:

  • Upgrade the following addons to the latest version:
    • @html-next/flexi-layouts
    • ember-cli-mirage
    • moment
    • ember-cordova-platform
    • ember-cordova-splash
    • ember-pikaday
    • ember-route-action-helper
    • ember-run-raf
    • liquid-tether

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.

version is undefined

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?

Doesn't work with Ember Fastboot

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...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.