firebase / firebase/firebase-js-sdk

Request to allow setting userVisibleOnly property in Microsoft Edge browser

Open
#8,310 1 comment 3 reactions 0 assignees View on GitHub
api: messaging type: feature request
Dominant language
TypeScript
Stars
5.1k
Forks
1k
Avg merge
2d 21h
Merged PRs (30d)
37

Description

### Operating System

macOS Sonoma 14.5

### Browser Version

Microsoft Edge 125.0.2535.51

### Firebase SDK Version

10.8.0

### Firebase SDK Product:

Messaging

### Describe your project's tooling

Microsoft Edge browser extension wtih React Redux Webpack Jest

### Describe the problem

This is a follow-up of the issue https://github.com/firebase/firebase-js-sdk/issues/8042 for Edge browser.

When we try to set the value of the property userVisibleOnly to false, “NotAllowedError: Registration failed - permission denied” error is thrown.

Till fcm-js-sdk provides an interface to set userVisibleOnly property, can we please allow setting the property in Microsoft Edge browser as well?

### Steps and code to reproduce issue

Change userVisibleOnly property value to false in the package @firebase/messaging -
```js
return swRegistration.pushManager.subscribe({
**userVisibleOnly**: false,
// Chrome <= 75 doesn't support base64-encoded VAPID key. For backward compatibility, VAPID key
// submitted to pushManager#subscribe must be of type Uint8Array.
applicationServerKey: base64ToArray(vapidKey)
});
```
Build and load the extension in Microsoft Edge browser (from version 121).
We can see the error in the console:
```html
fcm-js-sdk-issue
```

Contributor guide

Open the contributing guide

Research direction

Start in the @firebase/messaging code around swRegistration.pushManager.subscribe and reproduce the failure in a Microsoft Edge extension using userVisibleOnly: false. Compare the behavior from Edge 121 onward with the existing Chrome handling, then verify that the requested configuration works without the permission-denied error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react, typescript, webpack
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.