Moodle for mobile

Error: cannot read property 'replace' of null

Picture of Péter Lukács
Error: cannot read property 'replace' of null

Moodle 3.5.2+, Mobile app 3.5.2. Airnotifier properly configured.

I used SAML2 SSO addon for authentication. After logged in, when i click on 'Notifications' the attacked 'Error: cannot read property 'replace' of null' error pops up.

I fixed this issue with removing the existing user and logging in as new... any clues?

Average of ratings: -
Picture of Dani Palou
Re: Error: cannot read property 'replace' of null
Core developersMoodle HQParticularly helpful MoodlersPlugin developers

Hi Péter,

I looked at the code and there are several places where we call 'replace', but I think that the one that affected you could be this one:

notification.mobiletext.replace(/-{4,}/ig, '');

Maybe the app didn't receive the "mobiletext" property of one notification? It's  weird that it was fixed by removing the data :/



Average of ratings: -