Mobile Error // Unhandled Promise Rejection - can't read the WP REST API

Hello team,

I am getting this error on Mobile, more specific on Safari on iPhone 11 Unhandled Promise Rejection: Error: Add the URL of your WordPress REST API in state.source.api. The thing is that this happens on mobile only, so i am a bit confusedā€¦

Repo: https://github.com/dejangeorgiev/ruthgeorgiev-frontity

Thank you very much for your help.
Best,
Dejan

Hey @dejangeorgiev! We were able to reproduce your problem and we are taking a look at it. As soon as we know something more we will let you know.

Thanks for your patience. :slightly_smiling_face:

1 Like

Hey @David :wave:t2:

Great. Looking forward for your feedback! :slight_smile:

Thank you so much.

It seems to be a problem with the implementation we did to deprecate the URL constructor that we exported from frontity:

For some reason, it doesnā€™t work well in Safari (tested in version 13.1.2) and it throws an error, making the code to fail in the init() action of @frontity/wp-source and showing the error you mentioned.

I opened an issue in order to fix this (frontity/frontity#565). In the meantime, it should work fine using the previous version of frontity (1.10.1).

Weā€™ll keep you posted!


EDIT: We already find a solution and we are going to publish a new version today! You can wait for the new version of frontity instead of installing the previous one :blush:

1 Like

Great job @David! :raised_hands:t2:
Thank you guys for your support!

Let me know when the new version is available.
Many thanks.

@David found the solution, so Iā€™ve made a PR. It should be ready to merge as soon as he reviews it:

EDIT: Merged :+1:

1 Like

We have just released a new version with the fix. If you update the project following this guide, the problem should be solved. Let us know if you keep having that error. :slightly_smiling_face:

1 Like

hey @David @luisherranz @SantosGuillamot & co,

Thank you guys for your support! :raised_hands:t3:
Just tested it - works perfectly! :smiley:

3 Likes

Of course, this struck me right as I was making the first production release. The new fix solved this. Thank you guys for your hard and appreciated work! @luisherranz @SantosGuillamot and everyone else on the Frontity team.

4 Likes