relay-tools / react-relay-network-layer

ReactRelayNetworkLayer with middlewares and query batching for Relay Classic.
MIT License
277 stars 47 forks source link

Chinese Characters Issue #47

Closed brad-decker closed 7 years ago

brad-decker commented 7 years ago

Hey @nodkz. I'm hoping you can help us. We've been in a month long slice to get our site minimally viable for a Luxury Auction sale to chinese buyers. This included a lot of hard coding of chinese characters in the code base, but now our content team is adding translations into our database. I was able to trace this down by figuring out what page it was that was throwing the issue, here's a recap.

  1. Everything works fine, until you request the page that has the chinese characters in relay response.
  2. After that, every new page request will fail with the error message Server does not return response for request with id q*, (* being a wildcard) when in batching mode. If i remove batch middleware its this: Failed to execute 'fetch' on 'Window': Invalid value
  3. If i remove Relay network layer in favor of default network layer from Relay, it works (but i don't consider it a viable solution unless i have no other choices).

If you have time to look into this i would appreciate it greatly, otherwise if you could point me in the right direction to implement a fix myself that would be fantastic.

brad-decker commented 7 years ago

If if helps, here are the chinese characters i'm testing with: 夏季待售房产

nodkz commented 7 years ago

I can see what's wrong only on the next week. It's difficult to resolve problem and point you to right place from mobile. Please try to

PS. I can merge PR and publish new package from mobile.

brad-decker commented 7 years ago

False alarm. It was in our custom middleware for adding headers where a chinese character was actually being added into a header and causing the entire fetch utility to fail after that. My bad! Thanks @nodkz