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

js demo doesn't work now #9

Closed
formichael opened this issue Jan 10, 2017 · 8 comments
Closed

js demo doesn't work now #9

formichael opened this issue Jan 10, 2017 · 8 comments
Labels

Comments

@formichael
Copy link

I signed up from this, but nothing happened when I click "SIGN UP" button. The chrome development tools showed that no data had been sent.

@or-else
Copy link
Contributor

or-else commented Jan 10, 2017

Please give me more information.

@formichael
Copy link
Author

formichael commented Jan 11, 2017

OS: window 10 professional 64bit
Browser: Google Chrome 55.0.2883.87 m (64-bit)
Url: http://api.tinode.co/x/example-react-js/#
Client: 08/09/2016 06:08:02
Server: 0.7 (20160808T21:57:19Z) (api.tinode.co)

While I signed in using wrong pair username and password, got response "401 authentication failed" and found a get request log as follow:
Request URL:ws://api.tinode.co/v0/channels?apikey=AQEAAAABAAD_rAp4DJh05a1HAwFT3A6K Request Method:GET Status Code:101 Switching Protocols

But when I clicked “SIGN UP” button, none of response had got, and no logs appended to chrome dev network window. Here is the mtr results(maybe my network problem?):
| 172.16.36.1 - 0 | 60 | 60 | 65 | 67 | 69 | 68 |
| 27.105.94.126 - 4 | 52 | 50 | 0 | 69 | 72 | 68 |
| 219.85.72.181 - 4 | 52 | 50 | 0 | 69 | 72 | 68 |
| 219.85.72.77 - 0 | 60 | 60 | 68 | 72 | 108 | 69 |
| 203.163.222.21 - 17 | 36 | 30 | 0 | 69 | 72 | 68 |
| 108.170.244.99 - 22 | 32 | 25 | 0 | 68 | 70 | 69 |
| 66.249.95.6 - 38 | 24 | 15 | 0 | 68 | 69 | 69 |
| 72.14.238.136 - 56 | 18 | 8 | 0 | 72 | 82 | 71 |
| 72.14.233.136 - 92 | 12 | 1 | 0 | 101 | 101 | 101 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |
| No response from host - 100 | 11 | 0 | 0 | 0 | 0 | 0 |

@or-else
Copy link
Contributor

or-else commented Jan 11, 2017

Method:GET Status Code:101 Switching Protocols

That's initialization of a websocket connection. All further communication happens over a websocket so you don't see any HTTP requests in the browser log.

Please open the browser javascript console. All packets are logged there.

What's the exact sequence of your actions? Your login failed, you went to Sign Up screen, filled out the form and clicked [Sign Up]? Or you clicked [Sign Up] without filling the form?

@formichael
Copy link
Author

formichael commented Jan 11, 2017

My actions are went to signup screen, filled out the form and click [Sign Up].
Username, password, and full name were all filled with "hellou"

And here are logs of browser javascript console:
embedded:257 Uncaught TypeError: Cannot read property 'trim' of undefined at Constructor.handleSubmit (eval at transform.run (https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js:4:28099), <anonymous>:273:28) at Object.ReactErrorUtils.invokeGuardedCallback (https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.js:10707:16) at executeDispatch (https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.js:2969:21) at Object.executeDispatchesInOrder (https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.js:2992:5) at executeDispatchesAndRelease (https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.js:2446:22) at executeDispatchesAndReleaseTopLevel (https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.js:2457:10) at Array.forEach (native) at forEachAccumulated (https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.js:16746:9) at Object.processEventQueue (https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.js:2619:7) at runEventQueueInBatch (https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.js:10732:18) at Object.handleTopLevel [as _handleTopLevel] (https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.js:10743:5)

@or-else or-else added the bug label Jan 11, 2017
@or-else
Copy link
Contributor

or-else commented Jan 11, 2017

Yep, verified.

@or-else
Copy link
Contributor

or-else commented Jan 11, 2017

Fixed on dev. Will deploy later today.

@or-else
Copy link
Contributor

or-else commented Jan 11, 2017

Uploaded the latest version. Make sure you completely reload all the files.

@or-else or-else closed this as completed Jan 11, 2017
@formichael
Copy link
Author

Great, good job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants