I'm using the network calls and adding the following statements before reading the response.
r.setReadResponseForErrors(true);
r.setFailSilently(true);
NetworkManager.getInstance().addToQueueAndWait(r);
I don't want to show network error on Mobile App to the user but want to read the response code and perform the operation accordingly. Does this order matters? or do I have to setFailSilently() before setReadResponseForErrors? Please advise.
Thanks
You've mentioned this in another question where I literally quoted the code of fail silently...
You probably have a network manager listener probably in your init method where you show a generic error. That's part of the application boilerplate code.
Related
Can any one explain why a get request kept on called in Reacts application. Refer the below image.
I found out the solution, I was using a npm package "react-detect-offline" to render components based on online and offline status, that was triggering a request to check the same.
if possible could you please expand upon your question a little more, like maybe an example of your code that's making the request?
(I don't have enough rep to post comments)
My sign in with firebase authentication completes successfully. I am using signInWithPopup. It returns a blank screen but does not break the flow. However after logging in, a message appears in my console. The message is :
A boolean is being passed as a fourth parameter to window.open. This is not used and may cause an exception in a future release.
How do I handle this exception?
The second part of the question is what data in response(that we get in promise from firebase sign in with popup) correlates with the above mentioned exception? Is it a completely different problem or does it have anything to do with the blank popup? Thank you in advance. If more information is needed to solve the problem, kindly say so.
This may be a newly introduced bug with Firebase and one of its dependencies. I suggest rolling Firebase to a previous and consistent version for Firebase and its sister modules
Source:
https://github.com/firebase/firebase-js-sdk/issues/4988
I am creating a socket.io app using angular 2 on the frontend and I am getting a very weird behavior that I have never seen before when working with socket.io. I have no idea if my code is causing the issue or if it is something within the interaction between angular2 and socket.io, but if it is my code, I can't say what code I might need to post.
The mysterious behavior: At first instinct, my process for testing if my sockets connections are working properly is to open up an incognito tab, go to my project site, log in as a different user and see if API requests are emitted properly across the users. However; right now EVERY action that is made on either of the users happens to the other user. EX: if I type into a form one of the clients, the other clients form will get updated with the same information. If I click the forms submit button to post the data in the form, the other clients submit button will be clicked as well. Occasionally, it happens when navigating between states, where the other client will also navigate to the state. The behavior also occurs when logging on to a completely different computer, so imagine it is an issue with how socket.io emits data.
All the clients are connecting and disconnecting appropriately and are getting assigned unique socket ID's.
Turns out, the solution was a bit simpler than I was expecting it to be. I strange behavior occurs through a conflict with npm live-server running at the same time as my socket.io connection. I still cannot explain why the conflict was manifested as this sort of strange behavior, but at least I got it to stop by running the app as an express app serving up the index.html.
If anyone could explain why this might have been happening, I would love to hear.
I noticed that every createchannel() replaces the iFrame url.
Is there any chance that due to a re-call to createChannel() my iFrame is being replaced by new iFrame BUT the binding between the clientID and the iFrame url wasn't updated?
For example:
I called "channel.create_channel(unique_id)" - and I got back the JS with 123.talkgadget.google....as an iFrame.
Then,
I called again with the same client id "channel.create_channel(unique_id)" - and I got back the JS with 456.talkgadget.google....as an iFrame.
Is there any chance that if I call now "channel.send_message(unique_id,msg)"
the message will be sent to 123.talkgadget.google instead of 456.talkgadget.google resulting that I didn't get the message?
Thanks!
I'm not 100% certain about this answer. I haven't tested thoroughly, it's a little hard to test since the dev_appserver behavior is quite different from the real server behavior.
I believe I have seen this behavior before (missing messages).
If you close the old channel from the client side it seems to make everything work properly.
I have not tried handling the case where you lose your internet connection and you can't close from the client side though.
I implemented the observer design pattern in my application, but my app sends to an remote server requests via http protocol that take some time to resolve.
So, naturally, I did the sending an receiving part in a separate thread.
Can you please tell me how to make an window that observes the RequestObject to modify it's state based on the state of the request?
In the debugger step by step mode the window runes the code that I want it to do, but the window never refreshes its self.
Since I don't have a sample of your code I don't know the exacts of how you are updating your UI. If you are attempting to update the UI in the seperate thread that could be your issue. This may be of some help. http://msdn.microsoft.com/en-us/magazine/cc188732.aspx
You may also consider using the Task Parellel Library to perform your asyc operations.
http://msdn.microsoft.com/en-us/library/dd997423.aspx