CRD host for linux - "OAuth credentials are invalid" - linux

I was trying to build the chromium source for the chrome remote desktop host and chromoting web app in linux. I followed the instructions from here and here, and the build was successful.
But the problem is when I add the chromoting webapp as an extension, it starts, asks for authorization, but after that shows:
Error: invalid_client
Examining the request details, I got client_id=dummytoken and believe this is the problem. So my question is, why this is happening and how can I solve this?
Another problem is when I try to start the chrome remote desktop host process, it stops with the following message:
...
Launching host process
['/opt/google/chrome-remote-desktop/chrome-remote-desktop-host', '--host-config=-', '--audio-pipe-name=/home/diptap/.config/chrome-remote-desktop/pulseaudio#7e4d6b70aa/fifo_output', '--signal-parent']
wait() returned (6794,26112)
Host process terminated
Failure count for 'host' is now 1
OAuth credentials are invalid - exiting.
Cleanup.
Terminating Xvfb
....
Why my credentials are invalid? Are these two problems are related? I got them according to the steps mentioned in the links.
This is first time I am building chromium or any chrome app, I may miss something obvious.

ok so I just figured this part out. Stuck at the next stage. I shall help you move forward.
I assume you compiled the chromoting webapp yourself. the credentials from the google cloud console dont seem to stick when you build it. I had to manually add it later.
Go to the folder where the app is located and modify plugin_settings.js as follows
remoting.Settings.prototype.OAUTH2_CLIENT_ID = 'YOUR CLIENT ID HERE'
remoting.Settings.prototype.OAUTH2_CLIENT_SECRET = 'YOUR CLIENT SECRET HERE'
and now you should be able to get past that stage. Infact you will now be able to access remote machines. enabling remote access to this machine however is posing me a few small problems. let me know where you get to

Related

YouTube Data API v3 OAuth setup from Python

I am using Python to directly run a script of automatically replying user's comments.
I have a client secrets file after applying for a web-application. However, when I run for credentials, it first asks me to Please visit this URL to authorize this application and then when I clicked on it, it gives me this error:
Error 400: redirect_uri_mismatch The redirect URI in the request, urn:ietf:wg:oauth:2.0:oob, can only be used by a Client ID for native application. It is not allowed for the WEB client type. You can create a Client ID for native application at.
What application should I have applied for the OAuth in this case.
I know that this issue could be related to redirect URL. But because I am running this out of my script on my local computer, I am wondering what my URL should be.
You have to acknowledge that your issue above is precisely due to the redirect URI mismatch. The error response you got from the API is indicating you this.
To fix you issue, you'll have to have the same redirect URI set on your project within Google developers console and, at the same time, within your Python script.
If you indeed are running your application on your desktop (laptop) computer, then follow on the error message advice: within Google developers console, do set your project type to be of Desktop kind.

Randomly getting a login prompt

I am randomly getting a login prompt asking me to log in to localhost:3000 while working on my project (in localhost). Sometimes it does not show up the whole day and next morning I get 10 prompts in a row (canceling through pressing escape), and then it starts working properly again.
These are the errors I get in the console when it has been canceled:
I suspect one of the following, but really I have no idea:
Webpack is not configured correctly
There is some resource that requires authentication (but I can't figure out which), I am running everything on localhost
There is something wrong with the node.js server thingy...
Any tips on what might be going on are very welcome.
Edit: My backend is mocked in localhost.
Edit 2: I found this: Receiving login prompt using integrated windows authentication and it is possible that the thing that is causing the error is some faulty configuration in my IIS. But it is difficult to verify since it only shows up randomly.
Webpack has nothing to do with your API calls.
401 errors are due to auth credentials failing.
It means that your backend ask you to update your token(s) used for auth in API calls.

Slackbox - the requested URL could not be retrieved - access denied

I have slackbox running locally, have created a Spotify dev application and have successfully authenticated slackbox. It says I am logged in at http://localhost:5000/. All of my variables have been set, including the slack token, in an .env file via dotenv.
All seems well there.
On the slack side, I have created a slash command mapped to /spotify that POSTs to http://localhost:5000/store. The slash command shows up in my command description list when typing.
When I attempt to use it though, I get an access denied message in chat, I'm assuming due to cross-domain issues:
ERROR: The requested URL could not be retrieved Access Denied.
According to their docs - https://github.com/benchmarkstudios/slackbox - running this locally should work. I also run a Hubot bot locally and it integrates fine with the same slack room.
Any help is appreciated!
https://sprint.ly/blog/5-steps-to-a-slack-integration/
Slack’s outgoing slash command requests need to be sent to a public facing url, which is a problem if we want to receive these messages to our local development server.
How do we solve this?
One way is with the use of a secure tunnel which acts as a public HTTPS URL for our local development server. Problem solved!
Who provides this service?
ForwardHQ provide the best user experience, including a browser extension for setting up a local tunnel in one click. They have a free 7 day trial.
My preferred option is ngrok. It’s free for one concurrent tunnel client, with no time restriction. Woop! Its a little harder to use but it does the job.

Getting chromecast sample code to run

I have found no joy in getting any of the sample programs for Chrome to connect to my Chromecasts.
The Chromecasts have been registered and I am able to browse to their IP address port 9222 successfully.
Both the Chrome browser and Beta extension are up to date.
I have tried the CastHelloVideo-Chrome, CastMedia-Chrome and Cast-Tictactoe-Chrome and all fail to connect. The developer console shows a pair of errors:
GET chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js net::ERR_FAILED
and
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('file://') does not match the recipient window's origin ('null').
When testing our own code we get an error when calling requestSession but the message returned by Chrome.cast.Error is useless since the function and variable names have been obscured.
I also have a difficult time testing the examples for Chrome. I decided to use Chrome to test because debugging JavaScript is so much quicker than going directly to Android. I spent hours trying to figure out why I keep getting the error message GET chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js net::ERR_FAILED and Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('file://') does not match the recipient window's origin ('null') if I run it from my PC but not when I run it from an example website at http://www.videws.com/eureka/helloVideos/ provided by one of the Cast developers at Google. I keep reading/trying different combinations from his readme note in the example until it dawned on me what he meant by "Put all files on your own server" instead of "computer".
I created a public weblink on my Google Drive, make the folder public and copied all the files there. When go to Google drive on the web, preview the example (index.html), the example runs beautifully. I tried tic-tac-toe. It also runs.
So the answer is you need to run it off a website -- not from a local file in your computer (ctrl-O in Chrome)
I hope this will help you going with Cast.
Danh
I was finally able to get connected, but from Android. Many steps will be the same though.
I tested this: https://github.com/googlecast/CastHelloText-android It let's you speak into the phone, and what you say appears on the TV/Chromecast. I didn't install the formal sender app, but I was able to load the TicTac Toe from the receiver as well. So i have seen them both on my CC.
I couldn't connect until I properly setup the RECEIVER APPLICATION. You didn't mention it.
What I did from where I think you are at.. I just double checked my receiver app settings.
File copy the receiver.hml file provided in the sample sender app. Place it in a public dropbox folder. copy that public link to my clipboard.
Go back to where you registered your Chromecast device(s). https://cast.google.com/publish -Add An Application. I called mine : ReceiverSimple
Edit the app you just created, and for the URL field: paste in that public link. For you, set the platform to Chrome. It did not seem to matter whether or not i included the package name, so try leaving it blank.
Save It. Now COPY to clipboard the ApplicationID for the receiver you just created.
Open the provided sender app source code, and find where it's using APP_ID (hopefully R.Strings or equivalent in chrome ) Paste that App ID in. That will tell your client to use your receiver app, (and therefore, load that receiver.html file into the chrome cast screen).
also try a chrome cast reboot as another means of sanity checking.
I think you're close.

Unable to deploy web application using web deployment tool

I deployed an application on Azure. Now, I setup my MvcWebRole project to publish directly to my role instance through web deploy. (refering link : http://www.wadewegner.com/2010/12/using-web-deploy-with-windows-azure-for-rapid-development/ )
However, whenever I am trying to publish an application, it is giving an error like:
Error 1 Web deployment task failed.(Remote agent (URL http://mywebsvr/MSDEPLOYAGENTSERVICE) could not be contacted.
Make sure the remote agent service is installed and started on the target computer.)
The requested resource does not exist, or the requested URL is incorrect.
Error details:
Remote agent (URL http://mywebsvr/MSDEPLOYAGENTSERVICE) could not be contacted. Make sure the remote agent service is installed and started on the target computer.
An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected.
The remote server returned an error: (404) Not Found. 0 0 CPE Tracking System
I read some articles and most of them advise to make sure the remote agent service is already started by issuing the command "net start msdepsvc". But I don't know why issuing this command will return the error "The service name is invalid".
How come the server can't understand the parameter msdepsvc?
Would anybody please help!
Thanks,
TAdhav
I would try to use the new SDK 1.4 Refresh. That includes an officially supported WebDeploy tooling now and is much more likely to work without hiccups.
More information and link to download here:
http://blogs.msdn.com/b/windowsazure/archive/2011/04/15/now-available-windows-azure-sdk-1-4-refresh-with-webdeploy-integration.aspx
Thanks for your reply. Problem is resolved now. The user trying to deploy an application didn't have permission on machine.
Reference link: http://forums.iis.net/p/1176267/1974277.aspx
Link Used for setting up permission on server is: http://learn.iis.net/page.aspx/155/an-overview-of-feature-delegation-in-iis-70/
Thanks,
TA

Resources