# Login Failed. invalid character '\<' looking for beginning of value

**URL:** <https://drone.discourse.group/t/login-failed-invalid-character-looking-for-beginning-of-value/11487>\
**Category:** Drone Bugs\
**Created:** [August 10, 2020, 7:11am UTC](https://drone.discourse.group/t/login-failed-invalid-character-looking-for-beginning-of-value/11487 "2020-08-10T07:11:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fanux](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/fanux/32/4159_2.png) [@fanux](https://drone.discourse.group/u/fanux)\
**Post date:** [August 10, 2020, 7:11am UTC](https://drone.discourse.group/t/login-failed-invalid-character-looking-for-beginning-of-value/11487/1 "2020-08-10T07:11:01Z")

</div>

GitLab Community Edition 8.3.2 6288d134c, OAuth2 login failed.

```auto
docker run \
  --volume=/var/lib/drone:/data \
  --env=DRONE_GITLAB_SERVER=http://gitlab.xxx.com/ \
  --env=DRONE_GITLAB_CLIENT_ID=fae4b8b20b4022cf2f0d564a97dd79259b0d859b9db08c5686c83d89a9c219d6 \
  --env=DRONE_GITLAB_CLIENT_SECRET=e971889a1d69d6303bc3c0225f57b8a3fae427557a06533058ac00c58acee163 \
  --env=DRONE_RPC_SECRET=bea26a2221fd8090ea38720fc445eca6 \
  --env=DRONE_SERVER_HOST=100.7.146.28:80 \
  --env=DRONE_SERVER_PROTO=http \
  --env=DRONE_TLS_AUTOCERT=false \
  --publish=80:80 \
  --publish=443:443 \
  --restart=always \
  --detach=true \
  --name=drone \
  drone/drone:1.9.0

```

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/testdrone/original/2X/4/42f1b285811af6f5445e6019d30274447fdf0d6b.jpeg)

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [August 10, 2020, 12:27pm UTC](https://drone.discourse.group/t/login-failed-invalid-character-looking-for-beginning-of-value/11487/2 "2020-08-10T12:27:23Z")

</div>

this error indicates you are being served an HTTP webpage instead of a JSON API endpoint. The most common root causes for this error is that you configure an http address instead of https, and gitlab automatically tried to redirect. We have also seen people encounter issues with reverse proxies (nginx, etc) in which case you should check your configuration.

Example:  
[http://discuss.harness.io/t/drone-web-page-404-record-not-found-newly-installed-drone-after-drone-server-up-for-a-while-couple-hours/5648/19?u=bradrydzewski](http://discuss.harness.io/t/drone-web-page-404-record-not-found-newly-installed-drone-after-drone-server-up-for-a-while-couple-hours/5648/19)

---

<div class="post-metadata">

**Author:** ![fanux](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/fanux/32/4159_2.png) [@fanux](https://drone.discourse.group/u/fanux)\
**Post date:** [August 13, 2020, 2:57am UTC](https://drone.discourse.group/t/login-failed-invalid-character-looking-for-beginning-of-value/11487/3 "2020-08-13T02:57:03Z")

</div>

So this issue is not caused by gitlab version? Someone upgrade the gitlab version to 11.x and fixed this.  
Using [https://gitlab.xxx.com](https://gitlab.xxx.com) can fixed this?

---

<div class="post-metadata">

**Author:** ![fanux](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/fanux/32/4159_2.png) [@fanux](https://drone.discourse.group/u/fanux)\
**Post date:** [August 13, 2020, 3:09am UTC](https://drone.discourse.group/t/login-failed-invalid-character-looking-for-beginning-of-value/11487/4 "2020-08-13T03:09:54Z")

</div>

The redirect URI included is not valid.

My gitlab https server is fine.

This is my drone config:

```auto
docker run \
  --volume=/var/lib/drone:/data \
  --env=DRONE_GITLAB_SERVER=https://gitlab.xxxx.com/ \
  --env=DRONE_GITLAB_CLIENT_ID=3daf03e17fcb31e29ba22edfe2743c06c9267c41b7ddbfecd38888eb2952a660 \
  --env=DRONE_GITLAB_CLIENT_SECRET=700811167630a037238c33649ed69c0ecf9c1a585a40eb3e159994b8c90afccf \
  --env=DRONE_RPC_SECRET=bea26a2221fd8090ea38720fc445eca6 \
  --env=DRONE_SERVER_HOST=11.140.100.47:80 \
  --env=DRONE_SERVER_PROTO=http \
  --env=DRONE_TLS_AUTOCERT=true \
  --publish=80:80 \
  --publish=443:443 \
  --restart=always \
  --detach=true \
  --name=drone \
  drone/drone:1.9.0

```

---

<div class="post-metadata">

**Author:** ![fanux](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/fanux/32/4159_2.png) [@fanux](https://drone.discourse.group/u/fanux)\
**Post date:** [August 13, 2020, 3:25am UTC](https://drone.discourse.group/t/login-failed-invalid-character-looking-for-beginning-of-value/11487/5 "2020-08-13T03:25:52Z")

</div>

Or I need config drone server https?
