Uncaught (in promise) SyntaxError: Unexpected end of JSON input
问题 I am trying to send a new push subscription to my server but am encountering an error "Uncaught (in promise) SyntaxError: Unexpected end of JSON input" and the console says it's in my index page at line 1, which obviously is not the case. The function where I suspect the problem occurring (because error is not thrown when I comment it out) is sendSubscriptionToBackEnd(subscription) which is called in the following: function updateSubscriptionOnServer(subscription) { const subscriptionJson =