Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Cannot create a changeset on http://api06.dev.openstreetmap.org #4508

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 10 comments
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: don-vip
[Submitted to the original trac issue database at 11.41pm, Tuesday, 7th August 2012]

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

PUT http://api06.dev.openstreetmap.org/api/0.6/changeset/create... Internal Server Error

Error body: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
  <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="http://wiki.openstreetmap.org/wiki/Contact" 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>
  </div>
</body>
</html>
@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 6.30pm, Thursday, 9th August 2012]

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.

@openstreetmap-trac
Copy link
Author

Author: don-vip
[Added to the original trac issue at 6.32pm, Thursday, 9th August 2012]

Ok thanks ! :)

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 6.37pm, Thursday, 9th August 2012]

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?

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 6.40pm, Thursday, 9th August 2012]

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

@openstreetmap-trac
Copy link
Author

Author: don-vip
[Added to the original trac issue at 6.44pm, Thursday, 9th August 2012]

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.

@openstreetmap-trac
Copy link
Author

Author: don-vip
[Added to the original trac issue at 6.45pm, Thursday, 9th August 2012]

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

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 6.48pm, Thursday, 9th August 2012]

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.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 7.01pm, Thursday, 9th August 2012]

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

@openstreetmap-trac
Copy link
Author

Author: don-vip
[Added to the original trac issue at 7.49pm, Thursday, 9th August 2012]

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

ResponseCode=401, Error Body=

Thank you :)

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 8.54pm, Thursday, 9th August 2012]

Thanks for testing. I've opened pelle/oauth-plugin#125 upstream to get the fix in properly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant