Upon the following HTTPS request and fetch in backend, I’m getting the below quoted log from the Browser developer tool.
import {fetch} from ‘wix-fetch’;
export function navigate(latitude, longitude) {
console.log (“latitude ====>”, latitude )
console.log (“longitude ===>”, longitude )
//const url = “Driving directions, live traffic & road conditions updates - Waze”
const url = “Driving Directions, Traffic Reports & Carpool Rideshares by Waze”
let fullUrl = url + “il=” + latitude +“%2C” + longitude + “&navigate=yes&zoom=17”;
console.log(fullUrl)
return fetch(fullUrl, {method: ‘get’})
.then(response => response.json())
}
QUOTED LOG
VM24 extensions::lastError:4 Uncaught (in promise) TypeError: Converting circular structure to JSON
(anonymous) @ VM24 extensions::lastError:4
exports.fromJson @ VM24 extensions::lastError:4
n.onreadystatechange @ VM24 extensions::lastError:4
o @ wixcode-worker.js:17
wixCodeNamespacesAndElementorySupport.min.js:4 Uncaught (in promise) TypeError: Converting circular structure to JSON
wixCodeNamespacesAndElementorySupport.min.js:4 Uncaught (in promise) TypeError: Converting circular structure to JSON
wixCodeNamespacesAndElementorySupport.min.js:4 Uncaught (in promise) FetchError: invalid json response body at Driving Directions, Traffic Reports & Carpool Rideshares by Waze reason: Unexpected token < in JSON at position 0
wixCodeNamespacesAndElementorySupport.min.js:4 Uncaught (in promise) Error: invalid json response body at https://www.waze.com/ul?il=31.791029%2C34.6582905&navigate=yes&zoom=17 reason: Unexpected token < in JSON at position 0
at node-fetch/lib/body.js:48:31
at bound (domain.js:396:14)
at runBound (domain.js:409:12)
at tryCatcher (node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (node_modules/bluebird/js/main/promise.js:510:31)
at Promise._settlePromiseAt (node_modules/bluebird/js/main/promise.js:584:18)
at Promise._settlePromises (node_modules/bluebird/js/main/promise.js:700:14)
at Async._drainQueue (node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/main/async.js:15:14)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:121:23)
wixCodeNamespacesAndElementorySupport.min.js:4 Uncaught (in promise) FetchError: invalid json response body at https://www.waze.com/ul?il=31.791029%2C34.6582905&navigate=yes&zoom=17 reason: Unexpected token < in JSON at position 0