Skip to content
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

Clicking "Show all results" from autocomplete searchbar causes Bad Gateway error #213

Closed
adrienjoly opened this issue Aug 13, 2019 · 4 comments

Comments

@adrienjoly
Copy link
Member

adrienjoly commented Aug 13, 2019

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to openwhyd.org
  2. Click on search bar
  3. Tap some random text and wait for autocomplete results to appear
  4. Click "Show all results..." => bad getaway error page from cloudflare

image

Expected behavior

It should go to the search results page, like https://openwhyd.org/search?q=hellojd (for instance)

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Firefox

(also reported by Florent Pietot)

@adrienjoly adrienjoly added this to 📥 Inbox / ideas in Development via automation Aug 13, 2019
@adrienjoly adrienjoly moved this from 📥 Inbox / ideas to ⚡️To Do Next in Development Sep 17, 2019
@iNeoO
Copy link
Contributor

iNeoO commented Sep 24, 2019

 ===
web_1    | Tue, 24 Sep 2019 18:22:23 GMT, Error (concise trace)
web_1    |     at conciseTrace (/usr/src/app/app.js:40:10)
web_1    |     at Console.error (/usr/src/app/app.js:56:9)
web_1    | (node:16) UnhandledPromiseRejectionWarning: AlgoliaSearchError: Method not allowed with this API key
web_1    |     at success (/usr/src/app/node_modules/algoliasearch/src/AlgoliaSearchCore.js:375:32)
web_1    |     at <anonymous>
web_1    |     at process._tickCallback (internal/process/next_tick.js:188:7)
web_1    | ===
web_1    | Tue, 24 Sep 2019 18:22:23 GMT, Error (concise trace)
web_1    |     at conciseTrace (/usr/src/app/app.js:40:10)
web_1    |     at Console.error (/usr/src/app/app.js:56:9)
web_1    | (node:16) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
web_1    | ===
web_1    | Tue, 24 Sep 2019 18:22:23 GMT, Error (concise trace)
web_1    |     at conciseTrace (/usr/src/app/app.js:40:10)
web_1    |     at Console.error (/usr/src/app/app.js:56:9)
web_1    | (node:16) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
web_1    | ===
web_1    | Tue, 24 Sep 2019 18:22:23 GMT, Error (concise trace)
web_1    |     at conciseTrace (/usr/src/app/app.js:40:10)
web_1    |     at Console.error (/usr/src/app/app.js:56:9)
web_1    | (node:16) UnhandledPromiseRejectionWarning: AlgoliaSearchError: Method not allowed with this API key
web_1    |     at success (/usr/src/app/node_modules/algoliasearch/src/AlgoliaSearchCore.js:375:32)
web_1    |     at <anonymous>
web_1    |     at process._tickCallback (internal/process/next_tick.js:188:7)
web_1    | ===
web_1    | Tue, 24 Sep 2019 18:22:23 GMT, Error (concise trace)
web_1    |     at conciseTrace (/usr/src/app/app.js:40:10)
web_1    |     at Console.error (/usr/src/app/app.js:56:9)
web_1    | (node:16) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
web_1    | ===
web_1    | Tue, 24 Sep 2019 18:22:23 GMT, Error (concise trace)
web_1    |     at conciseTrace (/usr/src/app/app.js:40:10)
web_1    |     at Console.error (/usr/src/app/app.js:56:9)
web_1    | (node:16) UnhandledPromiseRejectionWarning: AlgoliaSearchError: Method not allowed with this API key
web_1    |     at success (/usr/src/app/node_modules/algoliasearch/src/AlgoliaSearchCore.js:375:32)
web_1    |     at <anonymous>
web_1    |     at process._tickCallback (internal/process/next_tick.js:188:7)
web_1    | ===
web_1    | Tue, 24 Sep 2019 18:22:23 GMT, Error (concise trace)
web_1    |     at conciseTrace (/usr/src/app/app.js:40:10)
web_1    |     at Console.error (/usr/src/app/app.js:56:9)
web_1    | (node:16) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
web_1    | ===
web_1    | Tue, 24 Sep 2019 18:22:23 GMT, Error (concise trace)
web_1    |     at conciseTrace (/usr/src/app/app.js:40:10)
web_1    |     at Console.error (/usr/src/app/app.js:56:9)
web_1    | (node:16) UnhandledPromiseRejectionWarning: AlgoliaSearchError: Method not allowed with this API key
web_1    |     at success (/usr/src/app/node_modules/algoliasearch/src/AlgoliaSearchCore.js:375:32)
web_1    |     at <anonymous>
web_1    |     at process._tickCallback (internal/process/next_tick.js:188:7)
web_1    | ===
web_1    | Tue, 24 Sep 2019 18:22:23 GMT, Error (concise trace)
web_1    |     at conciseTrace (/usr/src/app/app.js:40:10)
web_1    |     at Console.error (/usr/src/app/app.js:56:9)
web_1    | (node:16) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)

@adrienjoly
Copy link
Member Author

to reproduce, quickly search for "t", by pressing "t" and "enter", very quickly.

web_1    | === Tue, 24 Sep 2019 18:40:37 GMT GET /search?q=ttt&format=html&context=header&_=1569350395219 (search.controller) {"q":"ttt","format":"html","context":"header","_":"1569350395219"}
web_1    | search playlists { q: 'ttt' }
web_1    | => 0 hits
web_1    | search posts { q: 'ttt' }
web_1    | => 0 hits
web_1    | search tracks { q: 'ttt' }
web_1    | => 0 hits
web_1    | search users { q: 'ttt' }
web_1    | => 0 hits
web_1    | === Tue, 24 Sep 2019 18:40:37 GMT GET /search?q=t&format=html&context=header&_=1569350395220 (search.controller) {"q":"t","format":"html","context":"header","_":"1569350395220"}
web_1    | search playlists { q: 't' }
web_1    | => 2 hits
web_1    | search posts { q: 't' }
web_1    | => 1 hits
web_1    | search tracks { q: 't' }
web_1    | => 0 hits
web_1    | search users { q: 't' }
web_1    | => 1 hits
web_1    | === Tue, 24 Sep 2019 18:40:37 GMT GET /search?q=t&_=1569350395221 (search.controller) {"q":"t","_":"1569350395221"}
web_1    | search playlists { q: 't' }
web_1    | => 2 hits
web_1    | search posts { q: 't' }
web_1    | /usr/src/app/node_modules/mongodb/lib/utils.js:123
web_1    |     process.nextTick(function() { throw err; });
web_1    |                                   ^
web_1    | 
web_1    | TypeError: path must be absolute or specify root to res.sendFile
web_1    |     at ServerResponse.sendFile (/usr/src/app/node_modules/express/lib/response.js:425:11)
web_1    |     at renderFile (/usr/src/app/app/controllers/uploadedFile.js:133:14)
web_1    |     at renderImg (/usr/src/app/app/controllers/uploadedFile.js:151:12)
web_1    |     at /usr/src/app/app/controllers/uploadedFile.js:192:9
web_1    |     at /usr/src/app/app/models/post.js:213:5
web_1    |     at handleCallback (/usr/src/app/node_modules/mongodb/lib/utils.js:120:56)
web_1    |     at /usr/src/app/node_modules/mongodb/lib/collection.js:1416:5
web_1    |     at handleCallback (/usr/src/app/node_modules/mongodb/lib/utils.js:120:56)
web_1    |     at /usr/src/app/node_modules/mongodb/lib/cursor.js:683:5
web_1    |     at handleCallback (/usr/src/app/node_modules/mongodb-core/lib/cursor.js:171:5)
web_1    | npm ERR! code ELIFECYCLE
web_1    | npm ERR! errno 1

@adrienjoly
Copy link
Member Author

Also, doing a " " search on openwhyd.org results in a never-ending loading animation + errors in js console + content.bundle.js.map user profile trying to be opened! (from server logs)

Capture d’écran 2019-09-24 à 21 24 15

Capture d’écran 2019-09-24 à 21 24 15 copie

adrienjoly pushed a commit that referenced this issue Sep 24, 2019
contribute #213

What does this PR do / solve?
-----------------------------

Error with no image path for sendFile function.

Overview of changes
-------------------

No overview changes

How to test this PR?
--------------------
Spam search on tracks page
adrienjoly pushed a commit that referenced this issue Sep 24, 2019
## [1.14.1](v1.14.0...v1.14.1) (2019-09-24)

### Bug Fixes

* render image with no path for sendFile (uploadFile.js) ([#225](#225)) ([839ee02](839ee02)), closes [#213](#213)
@adrienjoly
Copy link
Member Author

fixed by #225

Development automation moved this from ⚡️To Do Next to ✔️ Done / pending QA Sep 25, 2019
@adrienjoly adrienjoly moved this from ✔️ Done / pending QA to 🌲 In production in Development Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development
  
🌲 In production
Development

No branches or pull requests

2 participants