Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fetch not working on real Fitbit (but working on Simulator)

ANSWERED

Hey everyone,

I am using a FitBit Ionic and I have the following issue with fetch:

For testing, I tried to fetch GitHub like this:

fetch('https://api.github.com')
.then(response => response.json())
.then(data => {
  console.log(data) 

When I run this piece of Code from my local machine, everything works fine. It also works when I run my app on the OS Simulator (using my Phone). When I however use my real Ionic, I get the error message:

Failed to fetch

Watch and phone are using the same WLAN. Thanks in advance for your answers.

 

Simon

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

I found the issue: In package.json the Internet submission was not given. Weird that it works with the simulator though.

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

I found the issue: In package.json the Internet submission was not given. Weird that it works with the simulator though.

Best Answer
0 Votes