-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App runs locally but returns 500 error on Heroku #466
Comments
We will need more of the error log than the last line. Please provide the full content of the error message. |
|
Use heroku logs to find out what the server log said when this happened.
El mar., 5 jun. 2018 17:35, Raul Rodriguez <[email protected]>
escribió:
…
- Code: 500 (undocumented)
- Details: Error: INTERNAL SERVER ERROR
- Response body: { "message": "Internal Server Error" }
- Response headers: connection: keep-alive, content-length: 37,
content-type: application/json, date: Tue, 05 Jun 2018 20:32:29 GMT,
server: gunicorn/19.8.1, via: 1.1 vegur
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#466 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACG0_maEzFcSvFYKnH5zQoG5WPHQi5qUks5t5ut-gaJpZM4UbFTC>
.
|
Seems to be an error returning JSON:
|
Yes, please share at least some of the app code, it is impossible to figure
this out like this. Be aware that this is not a support forum and this
issue might be closed since it is likely something wrong with your app.
El mar., 5 jun. 2018 20:45, Raul Rodriguez <[email protected]>
escribió:
… Seems to be an error returning JSON:
2018-06-05T23:42:05.746971+00:00 app[web.1]: [2018-06-05 23:42:05,742] ERROR in app: Exception on /id/val1/val2 [GET]
2018-06-05T23:42:05.746990+00:00 app[web.1]: Traceback (most recent call last):
2018-06-05T23:42:05.746992+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
2018-06-05T23:42:05.746994+00:00 app[web.1]: rv = self.dispatch_request()
2018-06-05T23:42:05.746995+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
2018-06-05T23:42:05.746997+00:00 app[web.1]: return self.view_functions[rule.endpoint](**req.view_args)
2018-06-05T23:42:05.746999+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask_restplus/api.py", line 319, in wrapper
2018-06-05T23:42:05.747001+00:00 app[web.1]: resp = resource(*args, **kwargs)
2018-06-05T23:42:05.747003+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/views.py", line 88, in view
2018-06-05T23:42:05.747005+00:00 app[web.1]: return self.dispatch_request(*args, **kwargs)
2018-06-05T23:42:05.747007+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask_restplus/resource.py", line 44, in dispatch_request
2018-06-05T23:42:05.747008+00:00 app[web.1]: resp = meth(*args, **kwargs)
2018-06-05T23:42:05.747010+00:00 app[web.1]: File "/app/app.py", line 30, in get
2018-06-05T23:42:05.747012+00:00 app[web.1]: res = req.json()
2018-06-05T23:42:05.747014+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/requests/models.py", line 892, in json
2018-06-05T23:42:05.747015+00:00 app[web.1]: return complexjson.loads(self.text, **kwargs)
2018-06-05T23:42:05.747017+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/json/__init__.py", line 354, in loads
2018-06-05T23:42:05.747019+00:00 app[web.1]: return _default_decoder.decode(s)
2018-06-05T23:42:05.747020+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/json/decoder.py", line 339, in decode
2018-06-05T23:42:05.747022+00:00 app[web.1]: obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2018-06-05T23:42:05.747024+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/json/decoder.py", line 357, in raw_decode
2018-06-05T23:42:05.747025+00:00 app[web.1]: raise JSONDecodeError("Expecting value", s, err.value) from None
2018-06-05T23:42:05.747033+00:00 app[web.1]: json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)
2018-06-05T23:42:05.748009+00:00 app[web.1]: 38.132.106.132 - - [05/Jun/2018:23:42:05 +0000]
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#466 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACG0_kA8UhOPmoegrt6DlTYdapj5BZMPks5t5xg1gaJpZM4UbFTC>
.
|
Definitely looks like something is wrong with the app or the request. What does the endpoint code look like, and what's the request you're sending? |
Here's a snippet:
|
If you look at the error you are getting in heroku
the line that is failing is the last in
this does not have anything to do with flask-restplus. This little snippet will also fail the same way
Not sure what you are trying to do with that, but it looks like you are using requests to hit an invalid URL and then |
The URL is a placeholder for the one I'm using in the application, but thanks for pointing out the |
I have a similar problem, I am working with django. The app works fine locally but when I upload it on heroku I get the 500 error 2020-03-25T07:18:44.000000+00:00 app[api]: Build started by user [email protected] |
@toxicOxygen The same problem... did you solve it? |
@Ekzotika no I could not solve the problem |
I had to host the app on pythonanywhere, (it worked over there) |
My logs looks like this:
Any idea on what could be the issue? |
i have the same problem too, i use flask-RESTfuly in combination with gunicorn, same settings as the op of the issue had. |
I don't know what I did but I made it to work. I started afresh deploy I think. |
I have the same problem. I use requests to parse the error and then use r.json() to parse the ouput. it works flawlessly in locally but gives a JSONDECODEDError when you deploy it. I dont know what to do. |
Has anyone been able to solve the issue? I ran into the same problem. |
I had this problem using rails and realized I had updated my schema locally but didn't run 'heroku run rails db:migrate'. Not sure what the equivalent is in Flask or Django |
that's caused due to bs4 scrapping issue don't know why sites are blocking heroku same code is working final on localhost but heroku is not able to scrap sites and is blocked so sites do not return much data and that's why we keep getting json decode error or if you try to run any query on bs4 coz you are using data which doesn't even exist on heroku . and yes that sucks |
I have the same problem! |
I figured it out! Thanks for the comments all! |
how |
I am new Heroku. After deployment, I run https://<app_name>.herokuapp.com/ got 500 internal server error. I cannot see any problem in log. Anybody can help me please |
Anyone solve this error? |
Contact me : [email protected]
\-------- Original Message --------
On Oct 11, 2020, 2:36 PM, Nikita Vozniuk < ***@***.***> wrote:
Anyone solve this error?
—
You are receiving this because you commented.
Reply to this email directly, [view it on GitHub][], or [unsubscribe][].![ANKPPISJH46MWKUPKU4LJBDSKGYHFA5CNFSM4FDMKTBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFIPXUXY.gif][]
[view it on GitHub]: #466 (comment)
[unsubscribe]: https://github.com/notifications/unsubscribe-auth/ANKPPIWPP25HFJZL2Z2Q6RDSKGYHFANCNFSM4FDMKTBA
[ANKPPISJH46MWKUPKU4LJBDSKGYHFA5CNFSM4FDMKTBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFIPXUXY.gif]: https://github.com/notifications/beacon/ANKPPISJH46MWKUPKU4LJBDSKGYHFA5CNFSM4FDMKTBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFIPXUXY.gif
|
|
I solved that problem when configured on Heroku app such refs: I have in resources file with such name application-prod.properties inside: spring.datasource.driver-class-name=org.postgresql.Driver So I set through terminal: |
2021-06-05T07:00:11.287316+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/init.py", line 127, in import_module |
same problem!! |
I've got same problem on django .. Its running perfectly on local host but returns internal sever error on heroku live server |
same problem |
has anyone solved it? |
2022-06-17T20:04:44.514420+00:00 app[web.1]: i don't know how to fix it, please can someone help me? |
same error |
Same error at Node.js.. And nobody knows the solution.. |
Read the log. |
Same issue here: when the login is through the social platforms like google, I get 500. I removed the social and still get a HTTP/1.1" 302 error. Everything works perfectly on local. Even tested on Apache server , but fails on Heroku after deployed. Anyone has more info? |
There doesn't seem to be any documentation on deploying to Heroku with flask-restplus. I've just deployed an app and am getting the following:
Error: INTERNAL SERVER ERROR
.My Procfile is set to
web: gunicorn app:app
and my app is set asapi = Api(app)
,app.wsgi_app = ProxyFix(app.wsgi_app)
, andapp = Flask(__name__)
, respectively. Anyone have any suggestions?The text was updated successfully, but these errors were encountered: