Skip to content

[firebase-messaging] Cannot read property 'AUTHORIZED' of undefined #17

@eikaramba

Description

@eikaramba

a little bit strange but i am using this code

const authStatus = await messaging.requestPermission({
    			ios: {
    				alert: true,
    			},
    		});

            const enabled = authStatus === messaging.AuthorizationStatus.AUTHORIZED || authStatus === messaging.AuthorizationStatus.PROVISIONAL;

and get the error (on Android)
Cannot read property 'AUTHORIZED' of undefined

authStatus is 0 here. you can reproduce this in my repo here: https://github.com/eikaramba/firebase-test

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions