question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Application not properly entitled for push notifications" error on APN token register

See original GitHub issue

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

6.0.4

Electron version

21.1.1

Operating system

macOS 12.6

Last known working Electron Forge version

6.0.0-beta.66

Expected behavior

Apple Push Notification feature should work after the app is built

Actual behavior

Receiving this error when the app try to register push notifications token:

(Error: 13 NSOSStatusErrorDomain {\n    NSDebugDescription = \"Application not properly entitled for push notifications.\";\n})."}

Steps to reproduce

  const { pushNotifications } = require('electron')
  pushNotifications.registerForAPNSNotifications()

Additional information

This is the package.json working:

    ...
    "@electron-forge/cli": "6.0.0-beta.66",
    "@electron-forge/maker-deb": "6.0.0-beta.66",
    "@electron-forge/maker-dmg": "6.0.0-beta.67",
    "@electron-forge/maker-rpm": "6.0.0-beta.65",
    "@electron-forge/maker-squirrel": "6.0.0-beta.65",
    "@electron-forge/maker-zip": "6.0.0-beta.66",
    ...

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hectorneyracommented, Dec 1, 2022

@erickzhao it works now, thank you!

1reaction
erickzhaocommented, Dec 1, 2022

@hectorneyra https://github.com/electron/forge/releases/tag/v6.0.0-beta.68 included a breaking change to the package for macOS code signing.

The osxSign parameters now work pretty differently and come with a lot more things by default. Can you see the MIGRATION.md to see if the 1:1 migration pattern works for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Registering Your App with APNs - Apple Developer
Registering Your App with APNs. Communicate with Apple Push Notification service (APNs) and receive a unique device token that identifies your app.
Read more >
Push Notification Troubleshooting for iOS - Braze
Step 2: Devices register for APNs and provide Braze with push tokens. When users open your app, they will be prompted to accept...
Read more >
Registering the iPhone application for push notification not ...
Try adding the aps-environment entitlement to your app's entitlements file, or switch the notification capability off and on again. Share.
Read more >
Fix “DeviceTokenNotforTopic” errors in Amazon Pinpoint and ...
2. Update the application's bundle ID to match the bundle ID that's registered with APNs and generate a new device token. 3. Then,...
Read more >
iOS Push Notifications - CleverTap Overview for Developers
The APNs bad device token error occurs when there is a mismatch between the APNs push mode on your app and the CleverTap...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found