Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4508 closed defect (invalid)

Cannot create a changeset on

Reported by: don-vip Owned by: Tom Hughes
Priority: minor Milestone:
Component: admin Version:
Keywords: Cc:


I cannot create a changeset on the master dev API server, I got an HTTP 500 error at each try:

PUT Internal Server Error

Error body: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  <img src="/assets/osm_logo.png" style="float:left; margin:10px">
  <div style="float:left;">
    <h1>Application error</h1>
    <p>The OpenStreetMap server encountered an unexpected condition that prevented it from fulfilling the request (HTTP 500)</p>
    <p>Feel free to <a href="" title="Various contact channels explained">contact</a> the OpenStreetMap community if your problem persists. Make a note of the exact URL / post data of your request.</p>
    <p>This may be a problem in our Ruby On Rails code. 500 occurs with exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code)</p>

Change History (10)

comment:1 Changed 8 years ago by Tom Hughes

Component: apiadmin
Owner: changed from rails-dev@… to Tom Hughes
Priority: blockerminor

This bug tracker is only really for issues in the production code - this is probably a configuration issue with the test instance so I'll move this over to the admin category.

comment:2 Changed 8 years ago by don-vip

Ok thanks ! :)

comment:3 Changed 8 years ago by Tom Hughes

The exception is in the OAuth code - there is literally none of our code running at the time.

I've restarted the server instance but if that doesn't fix it I'm not sure there's much more I can do - if you're testing a new client are you sure your OAuth code is correct?

comment:4 Changed 8 years ago by Tom Hughes

Resolution: invalid
Status: newclosed

It looks like the application key you are sending is wrong and doesn't exist in the database.

comment:5 Changed 8 years ago by don-vip

Damn, you're right, it looks like to be a JOSM bug always using the live API to request OAuth credentials, whatever the server we set up. Sorry for the inconvenience.

comment:6 Changed 8 years ago by don-vip

However, shouldn't the API respond something else than 500 in that case ? 403 maybe ?

comment:7 Changed 8 years ago by Tom Hughes

Ideally yes, but as I say it doesn't actually get to out code so any fix would have to be in the rails oauth plugin.

comment:8 Changed 8 years ago by Tom Hughes

I've applied a possible fix now - can you try it and see if you get a better error?

comment:9 Changed 8 years ago by don-vip

Much better ! When giving to the dev server a token created with the live API, I get this error now:

ResponseCode?=401, Error Body=<Couldnt authenticate you>

Thank you :)

comment:10 Changed 8 years ago by Tom Hughes

Thanks for testing. I've opened upstream to get the fix in properly.

Note: See TracTickets for help on using tickets.