Author Topic: [Solved] Error 403  (Read 429 times)

Offline hyzteric

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-1
[Solved] Error 403
« on: October 03, 2018, 09:04:47 am »
Hello,
I followed the docs twice, even if the screenshots are outdated, I managed to find everything.
It works fine with the test calendar.
But with my calendar, I got error 403.
I created a service account with key etc.
I got the json file uploaded in the develop apps stuff.
I believed that uploading the key file remotely didn't worked as it did not show up the file list. Anyway, I tried locally and still the same issue.
Why is everything with vera so complicated.  :(
What should I try next?
Thanks
« Last Edit: October 12, 2018, 10:50:09 am by Stuart »

Offline hyzteric

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-1
Re: Error 403
« Reply #1 on: October 03, 2018, 09:06:35 am »
Sharing settings of my calendar attached

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: Error 403
« Reply #2 on: October 03, 2018, 10:52:30 am »

Why is everything with vera so complicated.  :(


In this case it's more that google is (necessarily) complicated :-)   They also obviously have plenty of money as they can afford to constantly change UI's ......

The screen shots, on the surface, look OK.  Did you enable calendar API's for this project ?  It is never clear how to interpret these error codes into an application context - but 403 is telling us that there is some authentication issue.

Offline hyzteric

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-1
Re: Error 403
« Reply #3 on: October 04, 2018, 03:00:09 am »
Thank you for your reply.

The calendar API was not enabled  :-\
I suppose I overlooked it when I deleted everything and tried again.

I did enable it again now. It still say error 403. But sometimes it says "no more events today".
Of course, I put an event to test.

Offline hyzteric

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-1
Re: Error 403
« Reply #4 on: October 04, 2018, 03:08:18 am »
It seems that if I don't nothing, it will say "no more event today" but when I click "check" then it's err 403

Offline Maegda

  • Customer Care
  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 92
  • Karma: +2/-1
Re: Error 403
« Reply #5 on: October 04, 2018, 07:36:25 am »
Hello hyzteric,

I just dropped you an email, could you reply?

Thank you!
Vera Control, Ltd.  Smarter Home Control
support@getvera.com  +1 (866) 966-2272

Offline hyzteric

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-1
Re: Error 403
« Reply #6 on: October 04, 2018, 07:43:44 am »
Hello hyzteric,

I just dropped you an email, could you reply?

Thank you!
Just did.
Thank you!

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: Error 403
« Reply #7 on: October 04, 2018, 11:09:48 am »
Hello hyzteric,

I just dropped you an email, could you reply?

Thank you!

Hi Maegda --
I may be wrong but I think this is the very first time that someone from Vera support has become involved in troubleshooting this plugin.
Have you seen something that makes you suspicious that there is a problem on the vera end ?

The reason I ask is that the error is generated by the plugin following an https.request call to  https = require("ssl.https").
Is vera seeing a problem with the ssl.https module ?


Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: Error 403
« Reply #8 on: October 04, 2018, 12:49:53 pm »
It seems that if I don't nothing, it will say "no more event today" but when I click "check" then it's err 403

I went to the test calendar and disabled the google calendar api's.
I then pressed "check" with GCal3

The message was "Http error code 403"  -- so this confirms that not enabling the API for the service account is one of (the likely) cause(s) of 403.

The plugin then retries 3 more times to connect (each one after 30 sec).  If it still cannot connect, then it tries to display the last good "read" of the calendar.  In your case, there was none.  Therefore "no more events today"

When I enable the calendar API the error code no longer appears and the plugin functions normally.

You are still getting a 403 error.  So I suspect that you were not successful in enabling the google calendar API in the console.

It should look like the attached screen shot
« Last Edit: October 04, 2018, 12:58:26 pm by Stuart »

Offline hyzteric

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-1
Re: Error 403
« Reply #9 on: October 05, 2018, 03:04:32 am »
So... The API was enabled.
But anyway I thought I'd give it one more try. Knowing that computers have their moods too...
I went to the vera interface again. Uploaded the same json file again (I mean I didn't bother to download it from google again).
I "disarmed" the GCal3 Sensor device.
The "Calendar ID" field and the "Credential File" field were empty.
I entered the Calendar ID and clicked the Set button
I entered the Credential File name and clicked the Set button => I got a "DEVICE NOT READY" warning. I closed the popup.
And next thing you know, it's working!!??
I really don't know what went wrong the other times.

Thank you again for your time
Michel

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: [Solved] Error 403
« Reply #10 on: October 12, 2018, 10:34:58 am »
Prior to the 3.1 release.  Whenever CalendarID was set or New Credential file set -- I reloaded luup.  Partly as a precaution and partly due to some old code structuring that was no longer needed.   So that would be the Device not Ready message coming from vera.

As I was making some changes to to play nice with openluup - I saw the opportunity to change the mechanics a little.

Bottom line:  if you are on 3.1 then you should not see device not ready -- unless of course some other device / plugin / random vera thing caused a luup reload.