Gdata authorization errors - python-2.7

I have installed the google data python library in order to connect to google docs through python. The problem is that I am constantly getting a 401 error, while running the ./samples/docs/docs_example.py (as suggested on https://developers.google.com/gdata/articles/python_client_lib?csw=1#library) saying that authorization is required. But this is really strange, because I ran the tests using ./tests/run_data_tests.py and everything seemed to be fine (no errors here). Also I put in the right credentials of my google account, while running docs_example.py.
Has someone came across this issue before, or does somebody know a solution??
Tnx for your help.

Related

Djang-allauth signup issue on Heroku

before I get any deeper I’d just like to ask if any of you have experienced this issue.
When in local environment logging and signing up redirection work fine.
After deploying to Heroku, logging is fine but after signing up, redirection is not working and I’m getting Server Error 500.
Unfortunately, Heroku logs don’t give me any closer description why it is so.
It is just suspicious that locally is everything fine.
Is there any known issue I should be aware of? I haven’t found anything online and already spent days digging.
Many thanks for any help.

Google Cloud SDK documentation

I have just started looking at Google Cloud. I have been following this tutorial to try to setup the system.
I can successfully download the tar file, I can successfully run install.sh, however when I run the following command I get some unusual behaviour:
./google-cloud-sdk/bin/gcloud init
1) I agree to login - fine.
2) It brings up a page where I need to choose one of my accounts, which I do.
3) It brings up a website saying:
Google Cloud SDK wants to access your Google Account
I then hit Allow.
4) This is where it all goes wrong. It then tries to go to a website such as the following:
http://localhost:8085/?code=4/tQD6sXNDlkpcdFUctB7ZgKKuj7T1Aiqev4o7zGaDVpctit6zrqFfWbnAXSo_zFTVjo4_VyxrUlUtq8IgsRAS7M0&scope=openid%20email%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/cloud-platform%20https://www.googleapis.com/auth/appengine.admin%20https://www.googleapis.com/auth/compute%20https://www.googleapis.com/auth/accounts.reauth%20https://www.googleapis.com/auth/plus.me
The website displays something saying 'This site can't be reached'.
This seems strange to me. Why is Google attempting to access http://localhost:8085 ? Surely it should be going to some kind of Google site.
If you could offer any help or advice, I would very much appreciate it. Please bear in mind that I am new to Google Cloud and I would need some very basic help. I am trying to setup a simple website with something like "hello world" with html/css and python.
If you know of any alternative tutorials that work, I would really appreciate it.
I had the same problem as you. I solved it by using gcloud auth login --no-launch-browser

Authentication Error when Trying to Log into WSO2 IoT Server - Device Management Console in wso2-iot-3.3.0

I followed the instructions in the link (https://docs.wso2.com/display/IOTS330/Enterprise+IoT+solution) in Windows to start WSO2 IoT server. So, broker, iot-server and analytics are started. But, when I'm trying to log in to the device management console using admin login or the login credentials I created, it gives me an authentication error.
I tried the solutions in this answer (Not able to access WSO2 IoTS Device Management Console in wso2-iot-3.3.0 when logged in 'admin') also (Reducing Java version to 1.8.0_144 and making the compression parameter to off in all the catalina-server.xml files). But any of it didn't work for me.
I have attached the screen shots of the error. Please help me to go through this! Thank you.
Error in browser
Error description in iot-server console-Part 1
Error description in iot-server console-Part 2
This is related to the issue mentioned in the github issue mentioned below and it seems, it is already fixed in latest master.
As a quick workaround you could try to modify the startup script files (bat files in this case) and add the changes mentioned in the above git issue.
For example, you can change the file modules/distribution/src/core/bin/iot-server.bat at line number 73 as below.
FOR %%D in ("%CARBON_HOME%\wso2\lib\commons-lang*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\wso2\lib\%%~nD%%~xD"
Similarly do the same change as above for files mentioned below as well.
modules/distribution/src/core/resources/profiles/backend/iot-server.bat
modules/distribution/src/core/resources/profiles/keymanager/iot-server.bat
modules/distribution/src/core/resources/profiles/manager/iot-server.bat
This should resolve the issues you are facing.
Related github issue - https://github.com/wso2/product-iots/pull/1838/files

WSO IS 5.3.0: user dashboard not working out of the box

I'm evaluating WSO2 identity server for a customer of mine and currently we ponder whether to write our own user dashboard or use WSO2's version of it.
According to WSO 5.3.0 it's as easy as opening /dashboard. I don't find anything about how to install or enable the user dashboard and I didn't find a module I could install. Therefore I think that this should work out of the box. Yet, when I open the URL I get an error:
HTTP Status 500 - org.mozilla.javascript.EcmaError: ReferenceError:
"readFile" is not defined. (/dashboard//login.jag#47)
type Status report
message org.mozilla.javascript.EcmaError: ReferenceError: "readFile"
is not defined. (/dashboard//login.jag#47)
description The server encountered an internal error that prevented it
from fulfilling this request. Apache Tomcat/7.0.73
I tried to find the cause of this issue but the log files are in no way more verbose and after looking at the includes of login.ja redFile seems to be defined.
Can anybody please point me towards something that helps me solve this issue?
Thanks in advance!
For some reason (that are still to explore) three modules that were in the installation archive were missing from the actual installation. The modules were: caramel, handlebar and markdown. After installing them from the archive the dashboard started working.
Installing caramel only didn't work and my guess is that markdown is not necessary to run the dashboard but I might be wrong.
I found that is does not work with Safari. Identity Manager does.
I originally tried it on MacBook pro.
When I tried it with Chrome all is well.

How to make Django pass cookies when communicating with Node.js server using socket.io?

I am currently developing an instant messaging feature for my apps (ideally cross platform mobile app/web app), and I am out of ideas to fix my issue.
So far, I have been able to make everything work locally, using a Node.js server with socket.io, django, and redis, following what most tutorials online suggest.
The step I am now at consists in putting all that in the cloud using amazon AWS. My Django server is up and running, I created a new separate Node.js server, and I am using Elasticache to handle the Redis part. I launch the different parts, and no error shows up.
However, whenever I try using my messaging feature on the web, I keep getting an error 500:
handshake error
I then used the console to check the request header, and I observed that the cookies are not in there, contrary to when I am on localhost. I know it is necessary to authorize the handshake, so I guess that's where my error is coming from..
Furthermore, I have also checked that the cookies do exist, they are just not set in the request header.
My question is then: How can I make sure Django or socket client (not sure who's responsible here..) puts the cookies in the header??
One of my ideas was that maybe I am supposed to put everything on the same server, with different ports, instead of 2 separate servers? Documentation on that specific architecture problem is surprisingly scarce, compared to the number of tutorials describing how to make it work on local.
I hope I described the problem accurately enough! :)
Important note: I am using socket.io v0.9.1-1, only one compatible with a titanium mobile app.
Thank you for any help!
All right, so I've made some progress.
The cookie problem came from the fact I was making cross-domain request, adding a few lines enabled CORS, which didn't solve the cookie issue, but allowed me to communicate between servers (basically I set the headers of the response using express. I then passed necessary data in the query, even if not the most secure way to do it, I'm just building an MVP, and it's enough for now.
I haven't been able to make the chat work from my Titanium mobile app, but since I can use a webview to handle it, I will be fine.
Hopefully that will help someone.. If anyone needs me to post some code snippets I will gladly do so upon request!
Cheers