Skip to content

Compatibility with NativeScript 6 #268

@edselg

Description

@edselg

Using the JSDO with NativeScript 6 fails with an error like the following:

CONSOLE LOG file:///app/tns_modules/@angular/core/bundles/core.umd.js:25776:18: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
LOG from device E’s iPad: CONSOLE ERROR file:///app/tns_modules/@angular/core/bundles/core.umd.js:4160:24: ERROR Error: Uncaught (in promise): TypeError: null is not an object (evaluating 'object.result')
sessionRejectHandler(file:///app/vendor.js:13477:39)
at getSession(file:///app/vendor.js:13645:33)
at createSession(file:///app/0.819c957f9e93e0b2b6d0.hot-update.js:32:85)
at HomeComponent(file:///app/0.819c957f9e93e0b2b6d0.hot-update.js:21:27)

image

Steps to reproduce

  1. Create project using the following command:
    tns create testapp --template tns-template-master-detail-progress-ng
  2. Run the project using Preview:
    tns preview

Related links:

Research shows that this issue is caused by deprecation of the nativescript-localstorage plugin which is a dependency.
A solution for this issue is use the LocalStorageEmulation implemented a while back to work Node.js. Once the localStorage and sessionStorage references in progress-util.js point to the LocalStorageEmulation component, the project runs successfully.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions