lambdacasserole / avogadrio

Worship your favorite molecule by setting it as your wallpaper.
https://avogadr.io/
MIT License
297 stars 11 forks source link

avogadr.io API down #46

Closed crimist closed 2 years ago

crimist commented 3 years ago

Really nice tool! Been using it on all my monitors as wallpapers.

Unfortunately the API is down for all structures. Here's an example with the default one when you load the site (CCN(CC)C1=CC2=C(C=C1)N=C3C4=CC=CC=C4C(=O)C=C3O2).

URL: https://avogadr.io/api/smiles/3440/1440/ce3838/CCN(CC)C1%3DCC2%3DC(C%3DC1)N%3DC3C4%3DCC%3DCC%3DC4C(%3DO)C%3DC3O2

Request headers

Expand ``` GET /api/smiles/3440/1440/ce3838/CCN(CC)C1%3DCC2%3DC(C%3DC1)N%3DC3C4%3DCC%3DCC%3DC4C(%3DO)C%3DC3O2 HTTP/1.1 Host: avogadr.io Connection: keep-alive Pragma: no-cache Cache-Control: no-cache sec-ch-ua: " Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91" DNT: 1 sec-ch-ua-mobile: ?0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36 Accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 Sec-Fetch-Site: same-origin Sec-Fetch-Mode: no-cors Sec-Fetch-Dest: image Referer: https://avogadr.io/?background=5f0000&foreground=ce3838&rotation=0&smiles=CCN(CC)C1%3DCC2%3DC(C%3DC1)N%3DC3C4%3DCC%3DCC%3DC4C(%3DO)C%3DC3O2 Accept-Encoding: gzip, deflate, br Accept-Language: en,en-CA;q=0.9 ```

Response headers

Expand ``` HTTP/1.1 500 Internal Server Error Date: Thu, 10 Jun 2021 08:08:31 GMT Server: Apache/2.4.18 (Ubuntu) Cache-Control: no-cache, private Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8 ```

Response content:

Expand ``` data:text/html,

Whoops, looks like something went wrong.

(1/1) NotReadableException

Unable to init from given url (http://localhost:8080/molecule/CCN%28CC%29C1%3DCC2%3DC%28C%3DC1%29N%3DC3C4%3DCC%3DCC%3DC4C%28%3DO%29C%3DC3O2?render-stereo-style=none&render-comment-offset=16&render-comment=).

in AbstractDecoder.php (line 83)
at AbstractDecoder->initFromUrl('http://localhost:8080/molecule/CCN%28CC%29C1%3DCC2%3DC%28C%3DC1%29N%3DC3C4%3DCC%3DCC%3DC4C%28%3DO%29C%3DC3O2?render-stereo-style=none&render-comment-offset=16&render-comment=')in AbstractDecoder.php (line 329)
at AbstractDecoder->init('http://localhost:8080/molecule/CCN%28CC%29C1%3DCC2%3DC%28C%3DC1%29N%3DC3C4%3DCC%3DCC%3DC4C%28%3DO%29C%3DC3O2?render-stereo-style=none&render-comment-offset=16&render-comment=')in AbstractDriver.php (line 64)
at AbstractDriver->init('http://localhost:8080/molecule/CCN%28CC%29C1%3DCC2%3DC%28C%3DC1%29N%3DC3C4%3DCC%3DCC%3DC4C%28%3DO%29C%3DC3O2?render-stereo-style=none&render-comment-offset=16&render-comment=')in ImageManager.php (line 50)
at ImageManager->make('http://localhost:8080/molecule/CCN%28CC%29C1%3DCC2%3DC%28C%3DC1%29N%3DC3C4%3DCC%3DCC%3DC4C%28%3DO%29C%3DC3O2?render-stereo-style=none&render-comment-offset=16&render-comment=')in ImageManagerStatic.php (line 57)
at ImageManagerStatic::make('http://localhost:8080/molecule/CCN%28CC%29C1%3DCC2%3DC%28C%3DC1%29N%3DC3C4%3DCC%3DCC%3DC4C%28%3DO%29C%3DC3O2?render-stereo-style=none&render-comment-offset=16&render-comment=')in MoleculeRenderer.php (line 59)
at MoleculeRenderer->renderMolecule('CCN(CC)C1=CC2=C(C=C1)N=C3C4=CC=CC=C4C(=O)C=C3O2', 'ce3838')in MoleculeRenderer.php (line 84)
at MoleculeRenderer->renderScaledMolecule('CCN(CC)C1=CC2=C(C=C1)N=C3C4=CC=CC=C4C(=O)C=C3O2', 'ce3838', '3440', '1440')in index.php (line 78)
at {closure}(object(Request), '3440', '1440', 'ce3838', 'CCN(CC)C1=CC2=C(C=C1)N=C3C4=CC=CC=C4C(=O)C=C3O2')
at call_user_func_array(object(Closure), array(object(Request), '3440', '1440', 'ce3838', 'CCN(CC)C1=CC2=C(C=C1)N=C3C4=CC=CC=C4C(=O)C=C3O2'))in HttpKernel.php (line 153)
at HttpKernel->handleRaw(object(Request), 1)in HttpKernel.php (line 68)
at HttpKernel->handle(object(Request), 1, true)in Application.php (line 496)
at Application->handle(object(Request))in Application.php (line 477)
at Application->run()in index.php (line 152)
```

Response content render:

image

lambdacasserole commented 2 years ago

Thank you for letting me know about this. It's back up and online now, and should be robust against this same issue (crashing of the molecule rendering server) should it occur again. :slightly_smiling_face: