Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajax Response Weird #654

Closed
NobodyButMe-Haiya opened this issue May 6, 2018 · 11 comments
Closed

Ajax Response Weird #654

NobodyButMe-Haiya opened this issue May 6, 2018 · 11 comments
Labels
bug 🪲 Nope, this is wrong.

Comments

@NobodyButMe-Haiya
Copy link

NobodyButMe-Haiya commented May 6, 2018

reactotronweird

Reactotron version :1.15.0
React Native Version :0.553
Reactoron client(js) version : ^1.14.0
** latest reactotron client 2.0 also dont work.. Empty.
platform:mac

** I don't change any code, previously i can see ajax request. I have update all bower also.

@skellock
Copy link
Contributor

skellock commented May 6, 2018

Reactotron 2 requires the reactotron-react-native@next version because it hasn’t been released yet.

Apparently react-native’s new blob support has changed some stuff. I haven’t seen this in action yet though.

What does the yellow box say?

What does your fetch call look like?

@NobodyButMe-Haiya
Copy link
Author

NobodyButMe-Haiya commented May 6, 2018

i'm not sure i'm updating anything.. but it kinda disappear now.

Apparently react-native’s new blob support has changed some stuff ?
Sorry. I'm kinda not understand. It is react-native introduce new thing again ? I really scare if the create new thing each patches without proper note.

my fetch

async function post(url, params, fileUrl) {
   let securityToken = await AsyncStorage.getItem('securityToken');
   let data = new FormData();
   Object.keys(params).forEach((key) => {
       if (params[key] instanceof Date) {
           data.append(key, value.toISOString())
       } else {
           data.append(key, String(params[key]))
       }
   });
   const fetchOptions = {
       method: 'POST',
       headers: {
           'Accept': 'application/json',
           'securityToken': securityToken ? securityToken : '',
           'UserAgent': os
       },
       body: data,
       timeout: 6 * 1000
   };
   return fetch(url, fetchOptions)
       .then(checkStatus)
       .then(parseJSON)
}

A full gist at code

@skellock
Copy link
Contributor

skellock commented May 6, 2018

Ya, blob support landed recently (0.53? 0.54?) and with it, changes to the network stack.

I’ll. Have to take a closer look at posts with for data and figure out what changed and how to fix it.

Thx for the code. That makes it much easier.

@rmevans9
Copy link
Collaborator

rmevans9 commented Jun 9, 2018

Blob support landed in beta 4. Please let us know if this is still an issue!

@rmevans9 rmevans9 closed this as completed Jun 9, 2018
@NobodyButMe-Haiya
Copy link
Author

i will check up later . I will give the respond 👍

@ecerroni
Copy link

ecerroni commented Jun 9, 2018

I confirm that it now works as supposed.

working

@gorvinsky
Copy link

I'm still having this issue in reactotron-react-native@1.14.0

Testing on real Android device and develop on Windows.

capture

@ecerroni
Copy link

@gorvinsky

Indeed you need at least reactotron-react-native@2.0.0-beta.4 to make it work.

@gorvinsky
Copy link

@ecerroni After installing reactotron-react-native@2.0.0-beta.4 without modifying the codes, now it can't detect any activity at all.

@ecerroni
Copy link

@gorvinsky

Right, I forgot to say that the new v2 beta desktop client is needed as well. You can download it here:
https://github.com/infinitered/reactotron/releases

@gorvinsky
Copy link

It's working now Thanks a lot @ecerroni

joshuayoes pushed a commit that referenced this issue Jan 17, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
joshuayoes pushed a commit that referenced this issue Jan 27, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
joshuayoes pushed a commit that referenced this issue Jan 30, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
joshuayoes pushed a commit that referenced this issue Feb 1, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
silasjmatson pushed a commit that referenced this issue Mar 14, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Nope, this is wrong.
Projects
None yet
Development

No branches or pull requests

5 participants