Nativescript: [iOS ]JS ERROR Error: A Frame must be used to navigate to a Page.

Created on 19 May 2017  路  12Comments  路  Source: NativeScript/NativeScript

I know that this issue has solved in others topics but I still get this error. When I run tns run ios it causes this error. This is my package.json:

"nativescript": {
    "tns-android": { 
      "version": "2.5.0" 
    }, 
    "tns-ios": { 
      "version": "3.1.0-2017-5-16-2" 
    } 
  }, 
  "dependencies": { 
    "nativescript-statusbar": "^1.0.0",
    "nativescript-telerik-ui": "^2.0.1", 
    "tns-core-modules": "^3.0.0-rc.2"
  }
}

And my tns version is 3.0.1. I updated my project recently so this may cause the problem . Before I was using an older version which caused image-asset problem. To solve it I updated my tns but now this. Maybe I should update something else ? Any clues ?

ios question

All 12 comments

Same problem here with Android. After update i got the same error.-

Latest version changed the frame.*.js from:

(Line 9)

import { FrameBase, application, NavigationContext, stack, goBack, View, Observable, traceEnabled, traceWrite, traceCategories } from "./frame-common"; 

(Line 782)

navParam = application.getMainEntry();  

to:

(Line 5)

var frame_common_1 = require("./frame-common");

(Line 663)

navParam = frame_common_1.application.getMainEntry(); 

and application is no longer imported....

@dogabudak i just follow the instructions here and solve my problems.

https://docs.nativescript.org/releases/upgrade-instructions. Seems to be that updating just the platform or nativescript version doesn't work, everything must have an update.-
Good luck.-

@dogabudak the plugin nativescript-statusbar is currently not compatible with NativeScript 3.x.x.
The plugin is migrated via this PR but the change has to be approved by the plugin's author and then a new version will be published.

The current version (1.0.0) is compatible with NativeScript 2.5.x and below..
cc @burkeholland , @bradmartin (can we approve this PR and publish new version)

Apart from that you do not need to use the RC version of tns-core-modules as now there are already published 3.x.x version.
e.g.

"nativescript": {
    "tns-android": { 
      "version": "3.0.0" 
    }, 
    "tns-ios": { 
      "version": "3.0.1" 
    } 
  }, 
  "dependencies": { 
    "nativescript-telerik-ui": "^2.0.1", 
    "tns-core-modules": "^3.0.0"
  }
}

After changing the project's package.json file, delete node_modules and platforms and rebuild your project entirely

I did what @EstebanErcole said but it caused further problems actually. Also @NickIliev 谋 changed my package.json file nothing has changed actually.
file:///app/tns_modules/tns-core-modules/application/application.js:189:75: JS ERROR Error: A Frame must be used to navigate to a Page.
This is the exact problem actually

@dogabudak can you send us an application (link or archive) that can reproduce this error so we could test it on our side? (no need of node_modules and platforms folders ) You can also post the command used to build your application.

I'm hitting the same problem after upgrading tns from 2.5.2 to 3.0.0

The app builds and installs fine but when you start it, it comes up with this error message.

+1

@sandersr I hit this problem upgrading from 2.5.2 to 3.0.0 also. It seems there is lot of changes between those two versions. I have to re-write the code and it is working properly now.

In my project, the problem got fixed when I also changed the tns-ios version to 3.0.0. Forgot to upgrade it.

Hi,

I've got the same issue after upgrading from 2.5.x to 3.0.x. The code was working fine before the upgrade and it's throwing errors in JS libraries after the upgrade. For me it's a bug.

@dogabudak what have you changed in your code to make it work?

first I did what @EstebanErcole said . Than I re-wrote my main page because my app wasn't even starting. I believe there is some changes which I didn't read or isn't indicated in .After I re-wrote my main page. It started working flawlessly. I recommend you to read change notes.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings