Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught (in promise): Error: There is no topmost #26

Open
AnastasiyaDemi opened this issue Sep 1, 2019 · 2 comments
Open

Uncaught (in promise): Error: There is no topmost #26

AnastasiyaDemi opened this issue Sep 1, 2019 · 2 comments

Comments

@AnastasiyaDemi
Copy link

Hello @triniwiz , first of all - thank you for this and your other plugins.

Migrated here due to TobiasHennig/nativescript-toast#40, and now
i'm having trouble running nativescript-toasty v2.0.1 on tns-ios 6.0.1:

CONSOLE ERROR file:///node_modules/@angular/core/fesm5/core.js:5847:0 ERROR Error: Uncaught (in promise): Error: There is no topmost
_getView@file:///node_modules/nativescript-toasty/toasty.js:168:0
show@file:///node_modules/nativescript-toasty/toasty.js:102:0
showToast@file:///src/app/services/notification.service.ts:80:14
file:///src/app/app.component.ts:109:38
onInvoke@file:///node_modules/@angular/core/fesm5/core.js:24349:0
file:///node_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:883:0
onInvokeTask@file:///node_modules/@angular/core/fesm5/core.js:24340:0
drainMicroTaskQueue@file:///node_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:595:0
file:///node_modules/nativescript-angular/platform-common.js:174:0
notify@file:///node_modules/tns-core-modules/data/observable/observable.js:110:0
[native code] [<root>]
notifyAppStarted@file:///node_modules/tns-core-modules/application/application.js:143:0
didFinishLaunchingWithOptions@file:///node_modules/tns-core-modules/application/application.js:135:0
[native code] [<root>]
onReceive@file:///node_modules/tns-core-modules/application/application.js:33:0
UIApplicationMain@[native code] [<root>]
_start@file:///node_modules/tns-core-modules/application/application.js:277:0
run@file:///node_modules/tns-core-modules/application/application.js:305:0
bootstrapNativeScriptApp@file:///node_modules/nativescript-angular/platform-common.js:205:0
b<…>

Displaying toast via this service method:

  public showToast(message: string) {
    new Toasty({text: message}).show();
  }

Can you please suggest what is this 'topmost' and, maybe, how to fix that?

@razorsyntax
Copy link

I'm getting this same console error as well on 6.2.0 iOS.

@two-bridges
Copy link

two-bridges commented Nov 8, 2020

This Topmost error occurs for me when I call Toasty from app.component.ts (and toasty is in a service.ts file)

It works fine so long as it is called from another component, such as any page component rendered inside page-router-outlet

6.5.2 iOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants