Invalid character '<' looking for beginning of value

After setting up Drone with gitea on a local server I’m getting this error when trying to log in to drone.
I’ve found several threads telling me to remove the ‘/’ at the end of the Git Server variable, but that didn’t help. I would need some more information from drone itself to tell where the invalid data is coming from, so I can search for a solution.

The forward to gitea works and it successfully logs in. Drone answers the next request after that with a redirect to an error page.

  • Gitea v1.16.9
  • Drone 2.12.1
      - "DRONE_GITEA_SERVER=http://git.oas-serv-236"
      - DRONE_SERVER_HOST=drone.oas-serv-236
      - DRONE_TLS_AUTOCERT=false
      - DRONE_RPC_SECRET=...
      - VIRTUAL_HOST=drone
      - VIRTUAL_PORT=80
      - DRONE_LOGS_DEBUG=true
      - "DRONE_USER_CREATE=username:tho,admin:true"

@TimoHo have you looked at the existing threads for this error?‘<’

Yes I did, but I couldn’t find a working solution or any further clues anywhere.

I do have two working instances on a public server, but those use ssl. It might be a problem with that or an issue with name resolution inside the containers. I couldn’t find any issue with the name resolution and I don’t have the option to use ssl.

Drone also doesn’t provide any more useful information when enabling DRONE_LOGS_DEBUG, so I’d like to know if there is a way to find out where the error occurs and where the data came from.

Problem solved. The name of my gitea server was resolving to localhost inside the drone docker container. Due to that drone was making requests to itself instead of gitea and receiving html instead of json responses.