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

Chrome Desktop with Dev iOS View - TypeError: Cannot read property 'pushNotification' of undefined #560

Closed
watzak opened this issue Oct 23, 2019 · 7 comments

Comments

@watzak
Copy link

watzak commented Oct 23, 2019

Description:

There is an js error when u are visiting following url = https://www.watson.ch/wirtschaft/schweiz/930659620-moebel-pfister-von-xxxlutz-gekauft-schweizer-tradition-geht-nach-oesterreich
in mobile view

TypeError: Cannot read property 'pushNotification' of undefined
at Function.getSafariNotificationPermission (PermissionManager.js:83)
at Je. (PermissionManager.js:69)
at Generator.next ()
at SubscriptionError.js:3
at new Promise ()
at Ye (SubscriptionError.js:3)
at Je.getReportedNotificationPermission (PermissionManager.js:67)
at Je. (PermissionManager.js:39)
at Generator.next ()
at SubscriptionError.js:3

Steps to Reproduce Issue:

  1. https://www.watson.ch/wirtschaft/schweiz/930659620-moebel-pfister-von-xxxlutz-gekauft-schweizer-tradition-geht-nach-oesterreich
  2. on mobile or with user-agent mobile on chrome developers mode
  3. check console output and u will find a js error

Anything else:

Thanx for your help in advance ;)

@jkasten2
Copy link
Member

jkasten2 commented Oct 28, 2019

@watzak Thanks for reporting.

Issue Impact - Developer Environment

Only happens when selecting an iOS device (iPhone or iPad) in the Chrome Developer tools.
Confirmed on a real iOS device in either the Chrome or Safari browser this error does not occur.

Issue - Details

Selecting an iOS device (iPhone or iPad) in the Chrome tools ends up mocking the navigator.userAgent string to an iOS device, however it does not mock window.safari so this error occurs in that testing environment.

Workaround

This is an error we will be fixing, in the meantime you can use "responsive" or an Android device in the drop down to simulate a non-iOS device to keep it from causing any issues in your mobile testing from a desktop browser.

Edit: this was fix in release 151600 on 2023/03/13

@jkasten2 jkasten2 changed the title TypeError: Cannot read property 'pushNotification' of undefined Chrome Desktop with Dev iOS View - TypeError: Cannot read property 'pushNotification' of undefined Nov 5, 2019
@BasileusGR
Copy link

Is the issue solved? I have the same problem.

@weroh
Copy link

weroh commented Feb 26, 2021

Hi, I'm getting the same issue for Chrome Canary / Win10. Are there at least any workarounds for this issue?

@jkasten2
Copy link
Member

jkasten2 commented Mar 1, 2021

@weroh I updated my #560 (comment) above. Let me know if that covers your question.

@ghost
Copy link

ghost commented Jul 19, 2021

Its bug still actual.

@bfischer1121
Copy link

@jkasten2 do you think this is ever gonna be fixed?

@jkasten2 jkasten2 mentioned this issue Mar 10, 2023
13 tasks
@jkasten2
Copy link
Member

This is now fixed in the 151600 release that went out today.

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

No branches or pull requests

5 participants