chromecast loading the older version of my receiver app - google-cast

When I launch my receiver app on the chromecast device, it goes to the URL where my html is hosted to retrieve the receiver app to launch it.
However, when I update the contents of the HTML and JS sources on the hosted server and close the app on the chromecast, and relaunch the receiver app again, I often get the old version of the app and not the updated version that's already on the server.
I think this has to be some cache issue. I've disabled cache via the developer tools via the debugging port (9222), rebooted by device, created a cache manifest that tells it to cache nothing, it still wouldn't work, everytime I launch the receiver app on the device, it continually pulls the old version of the app from the URL.
Does anyone has any tips or solutions as to how I may force the chromecast to pull the latest version already on the hosted server?
thanks! :)
just a follow-up, when doing a curl on the command line, i'll always get the latest version. Just that the chromecast device keeps on getting the older version.

Open the DEBUG (javascript ) console http:// your chromecast ip:9222/ on Chrome browser while your receiver is visible.
Then enter the command window.location.reload(true); in the bottom of the console. This works every time I've tried it. It is also a good way to test broken session handling in your app as the refresh breaks any connections the page had setup. So it isn't perfect, but it will get the new content loaded.

You may also try adding
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
to your receiver page. In cases that I ran into this issues, rebooting the chromecast device had always cleared the cache.
HTH,
Ali

The Chromecast will cache the receiver if it's currently loaded. It will request a new Receiver if it's at the homescreen.
You can launch another app on your Chromecast then launch your Receiver again.
From the command line, you could do something like:
curl http://<ip of Chromecast>:8008/apps/YouTube
to launch the YouTube Receiver, then you could launch your own again.

Related

NPM Nodejs crashes with BSOD

So I'm getting a blue screen of death whenever I have "npm start" running for a reactjs app. It's an intermittent crash, i.e. it doesn't happen every time I run it nor are there any exact steps to duplicate the crash, but I'll try to explain below under what circumstances it happens.
Create a reactjs app using create-react-app npm module.
Start the app using npm start. Chrome window opens, webpack is listening to changes I make to the source files.
Change any source file, and save it. NPM compiles it, Chrome page refreshes, and I can see my changes.
The above things work fine as expected "normally", but once in a while, right after I save a file, the system crashes with a BSOD saying DRIVER_IRQL_NOT_EQUAL_TO_OR_GREATER_THAN (NETIO.SYS) There is no definite "step" or action other than saving the file, or refreshing Chrome that would cause this to happen, and it also doesn't happen every single time.
Here are the steps I took to find out/eliminate the root cause of this issue:
Disabled by AV (Symantec Endpoint Protection).
Use a different browser (Mozilla, hell, even IE).
Changed the system (used a different laptop, although the same type - Microsoft Surface on Windows 10)
Updated all drivers, etc. (Verified by my organization admins)
Closing all other programs, etc. that might potentially be interfering (Atom IDE, Eclipse, etc.)
The necessary conditions for the crash to happen are:
npm start must be running (webpack server on localhost:3000)
A browser window must be open connected to localhost:3000 (if no browser is connected, it doesn't crash even if you change and save the file 200 times - I checked). Also, doesn't matter which browser (Checked with Mozilla/Edge/Chrome)
I believe the crash happens when NPM is recompiling the files and serving it to the browser (asking it to refresh using some websockets), but I'm not an expert on NodeJS/NPM so I'm not sure.
I've been stuck on this issue for more than 2 weeks now. Any help would be really appreciated. Kindly let me know if more information is needed.
The issue was with Symantec DLP (Data Loss Prevention) that was also installed on all our systems. The issue resolved itself after the admins added application exceptions for Nodejs, NPM, my reactjs project workspace paths.
Just posting this so that in case someone has a similar issue they can try this or remove Symantec DLP altogether.

Stop node-debug from opening a new browser window

The command:
node-debug sls offline
opens a new browser window every time it is run.
How do we stop it from opening a new window every time? I want to reuse the existing window!
This is a known issue with node inspector. Take a look here.
Since 0.9.0 we use https://github.com/benderjs/browser-launcher2 to
start the browser, and make sure it's Chrome/Chromium/Opera (i.e. the
browsers that can properly render node inspector; we detect installed
browsers in the system and choose the most appropriate one; earlier we
used opener module which just delegated opening the browser to the OS,
which would open the defaul browser, which could have been e.g.
Firefox) and this could be the reason why the behavior has changed.
browser-launcher2 actually does a bit more than just launching a
browser, for instance it creates a new profile for Chrome in a
subfolder of ~/ - this is probably the issue that #CalvinScott
reported (i.e. Chrome that was opened was the new profile created by
browser-launcher, not your original profile; you should be able to
open your original profile of Chrome normally)
Also, you may consider this:
Since version 6.3, Node.js provides a buit-in DevTools-based debugger
which mostly deprecates Node Inspector, see e.g. this blog post to get
started. The built-in debugger is developed directly by the
V8/Chromium team and provides certain advanced features (e.g.
long/async stack traces) that are too difficult to implement in Node
Inspector.

Did Chromecast update break debugging?

Before the recent firmware update, web-based debugging (at port 9222) would persist between activities. Now any transition, say from the home screen to my app, stops the debugger with a message at the top saying...
Detached from the target
Remote debugging has been terminated with reason: target_closed.
Please re-attach to the new target.
It's not a huge problem to start a new debug window, but I'm worried that if the debugger isn't running when my app is loaded I won't get the benefit of the "Disable cache (while DevTools is open)" option.
Any details or workarounds would be appreciated.
UPDATE
Confirmed! In my case at least, the debugger stops with the above error and the latest version of my html, javascript, etc. does not get loaded
Try this as a work around and see if it works: when your page is loaded, run window.location.reload() in the debug console to reload the page (so you get a full debugging info from the beginning without missing anything) or window.location.reload(true) to do the same and clear cache as well.

OAuth callback URI changes port number in Azure emulator

I've developed a working solution using Azure SDK October 2012. It connects to another service that uses OAuth. When I move my solution to a machine using Azure SDK 2.1, the OAuth callback fails because the port number has changed.
For example, when I debug the solution it opens a browser at 127.0.0.2:82. Then I connect to the other service, and the callback comes to 127.0.0.2:83, which the browser can't find. Prior to being redirected to the other service, I can see that the controller is looking at the Request object and getting the invalid port # (83) from that.
I'm not a MVC or Azure whiz, but this solution works perfectly under the older version of the SDK. Did something change? btw I've tested this with IE10 and Chrome, so it's not a browser issue.
Just to be clear - I have the exact same solution running on 2 machines. One works, and the other doesn't. So it's not a problem with my code, unless there's something that explicitly needs to change for Azure SDK after October 2012.
The Oauth2 app has been configured to redirect on specific site + port, so either you need to reconfigure the Oauth2 configuration in the OAuthProvider
or else see why the emulator locally is binding to a different port. Maybe the other port is being used by some other site running in the emulator. Sometimes just restarting the emulator does the trick.
See this to understand how the local emulator works.
I was missing the [Authorize] attribute on the controller method that was looking at the Request object. When I added that, the port number problem went away.
Still not sure why it worked on one dev machine and not the other (or with one version of Azure SDK and not the other), but now it works on both, so there you have it.

Chrome extension say that this can use at offline mode

Question 1:
My Chrome extension of the Chrome store says that my plug-ins can run in offline mode but it will download and update data from json which they can not do without the internet. So how can I remove as it is not in Chrome store.
Can be run offline
If I understand you correctly, you should delete this line from your manifest file:
"offline_enabled": true
Read about it at code.google.com
Extensions running in offline mode means that your extension will still work if the there is not internet connection and any changes will be queued up to sync online once a connection is established again. Since all Chrome extensions on the Web Store require a working connection to install you can safely assume that all users of your extension will be able to download initial data sets needed by your extension.

Resources