~akagi/srht.el#4: 
Oautch error

Hi,

I’m using latest version and, after following instructions and creating oauth and oauth2, I’m unable to create, delete or update projects.

The error message I get is

Error running timer ‘plz--respond’: (error "Unkown error with status 403: #s(plz-error nil #s(plz-response 2 403 ((server . "nginx") (date

  • "Mon, 13 Nov 2023 19:00:25 GMT") (content-type . "application/json") (content-length . "168")) "{\"errors\":[{\"message\":\"Authentication error: Presently, OAuth authentication to the GraphQL API is only supported for OAuth tokens with all permissions, namely '*'.\"}]}") nil)")

Any idea ? I’m using defaults when creating oauth and oauth2.

Thanks,

Status
RESOLVED FIXED
Submitter
~csantosb
Assigned to
No-one
Submitted
1 year, 2 months ago
Updated
10 months ago
Labels
No labels applied.

~akagi 1 year, 2 months ago*

Hi, thanks for the bug report, when creating oauth2 token you need to select at least REPOSITORIES, PROFILE scopes for git.sr.ht from the "Limit scope of access grant" menu. I will add more details about this in the README. I also fixed another bug, please update and check.

~akagi 1 year, 2 months ago

I've also updated the README.

~csantosb 1 year, 2 months ago

Hi, thanks for the bug report, when creating oauth2 toeken you need to select at least REPOSITORIES, PROFILE scopes for git.sr.ht from the "Select access grants" menu. I will add more details about this in the README. I also fixed another bug, please update and check.

Thanks ! Updated and tested. I works much better now.

When using git, I just got a timeout warning once

(plz-curl-error "Curl error" #s(plz-error :curl-error (28 . "Operation
timeout.") :response nil :message nil))

Now, when using paste-region, I systematically have this error

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  srht--else(#s(plz-error :curl-error (28 . "Operation timeout.") :response nil :message nil))
  plz--respond(#<process plz-request-curl> #<buffer  *plz-request-curl*> "exited abnormally with code 28\n")
  apply(plz--respond (#<process plz-request-curl> #<buffer  *plz-request-curl*> "exited abnormally with code 28\n"))
  timer-event-handler([t 25939 10962 680166 nil plz--respond (#<process plz-request-curl> #<buffer  *plz-request-curl*> "exited abnormally with code 28\n") nil 538000 nil])

No issue with paste-delete, though.

~akagi 1 year, 2 months ago

First, let's start with srht-paste. Please complete these steps:

  1. M-x trace-function srht-create RET
  2. M-x trace-function srht-retrive RET
  3. M-x trace-function srht-paste-region RET
  4. Select one word on buffer
  5. M-x srht-paste-region
  6. Send here trace-output

~csantosb 1 year, 2 months ago

First, let's start with srht-paste. Please complete these steps:

  1. M-x trace-function srht-create RET
  2. M-x trace-function srht-retrive RET
  3. M-x trace-function srht-paste-region RET
  4. Select one word on buffer
  5. M-x srht-paste-region
  6. Send here trace-output

Here you have

https://paste.sr.ht/~csantosb/8d36d95f8ac019a88f9c1981e0f3cde6da01fc2f

~akagi 1 year, 2 months ago

Try to set plz-connect-timeout:

(setopt plz-connect-timeout 10)

Both errors are caused by curl timeout. The error with srht-git I was able to reproduce on the newly launched emacs. the srht-paste-region error is not reproducible on my machine.

Cayetano Santos 1 year, 2 months ago · edit

Great, that fixed the issue !

Thanks again for this lovely piece on code, and looking forward for new commands ... and new tags for packaging under guix.

Best,

C.

~akagi 1 year, 2 months ago

Ok, I'm closing the bug report then. I will add a tag with the 0.4 release, hopefully soon.

~akagi REPORTED FIXED 1 year, 2 months ago

Register here or Log in to comment, or comment via email.