luarocks / luarocks/luarocks-site

error 500 on luarocks.org/upload

Open
#95 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
MoonScript
Stars
201
Forks
50
PR merge metrics
No merged PRs in 30d

Description

This is from the web interface, but I got the same thing (minus traceback) from the CLI.

```
Error

...e/luarocks/.luarocks/share/lua/5.1/lapis/application.lua:668: ...luarocks/.luarocks/share/lua/5.1/cloud_storage/oauth.lua:46: Expected value but found T_END at character 1
stack traceback:
[C]: in function 'decode'
...luarocks/.luarocks/share/lua/5.1/cloud_storage/oauth.lua:46: in function 'refresh_access_token'
...luarocks/.luarocks/share/lua/5.1/cloud_storage/oauth.lua:33: in function 'get_access_token'
...uarocks/.luarocks/share/lua/5.1/cloud_storage/google.lua:203: in function '_headers'
...uarocks/.luarocks/share/lua/5.1/cloud_storage/google.lua:221: in function 'put_file_string'
./helpers/uploaders.lua:104: in function 'do_rockspec_upload'
./helpers/uploaders.lua:161: in function 'handle_rockspec_upload'
./app.lua:112: in function <./app.lua:110>

Traceback

stack traceback:
[C]: in function 'error'
...e/luarocks/.luarocks/share/lua/5.1/lapis/application.lua:668: in function 'handler'
...e/luarocks/.luarocks/share/lua/5.1/lapis/application.lua:402: in function 'resolve'
...e/luarocks/.luarocks/share/lua/5.1/lapis/application.lua:411: in function <...e/luarocks/.luarocks/share/lua/5.1/lapis/application.lua:409>
[C]: in function 'xpcall'
...e/luarocks/.luarocks/share/lua/5.1/lapis/application.lua:409: in function 'dispatch'
/home/luarocks/.luarocks/share/lua/5.1/lapis/nginx.lua:205: in function
```

The files I tried to upload:
https://alloyed.me/shared/loadconf-0.3.0-1.src.rock
https://alloyed.me/shared/loadconf-0.3.0-1.rockspec

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with cloud_storage/oauth.lua at refresh_access_token, then trace the upload path through cloud_storage/google.lua and helpers/uploaders.lua. Reproduce the web or CLI upload using the linked loadconf files, and consider the issue done when the upload no longer returns the JSON decode error or HTTP 500.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.