question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can't install on glitch+mLab

See original GitHub issue

Hi, Thank you very much, this project is a great idea!

There are errors when trying to install it on glitch.com I changed localhost to the correct domain name, adapted to use mLab db and had to run next build in the console and it ran. Web page is showing at https://alheimsins-bigfive-web.glitch.me, but example and finalizing the test throw client errors in the console, it’s related to the db since the results collection is not created. For example: {name: “Internal Server Error.”, message: “500 - Internal Server Error.”, statusCode: 500}

SW registered:  
ServiceWorkerRegistration {scope: "https://alheimsins-bigfive-web.glitch.me/", updateViaCache: "imports", active: ServiceWorker, installing: null, navigationPreload: NavigationPreloadManager, …}
active: ServiceWorker {scriptURL: "https://alheimsins-bigfive-web.glitch.me/service-worker.js", state: "activated", onerror: null, onstatechange: null}
installing: null
navigationPreload: NavigationPreloadManager {}
onupdatefound: null
paymentManager: PaymentManager {instruments: PaymentInstruments, userHint: ""}
pushManager: PushManager {}
scope: "https://alheimsins-bigfive-web.glitch.me/"
sync: SyncManager {}
updateViaCache: "imports"
waiting: null
__proto__: ServiceWorkerRegistration

You can see more errors if you test it directly at https://alheimsins-bigfive-web.glitch.me AFAIK, there are no error in the server console though https://glitch.com/edit/#!/alheimsins-bigfive-web If you can’t access the server, tell me your glitch username and I’ll grant you write access.

I tried with now.sh but I don’t get why it can’t see the now.json in my repo at project creation and from the local CLI I get something weird:

PS E:\bigfive-web> .\now-win.exe secrets add b5-db-connection "username:password@ds32165.mlab.com:25574/db"
> Error! The secret name "b5-db-connection" already exists for this user
PS E:\bigfive-web> .\now-win.exe
> WARN! You are using an old version of the Now Platform. More: https://zeit.co/docs/v1-upgrade
> Deploying E:\bigfive-web under zeitco14
> Error! No secret found by uid or name "b5_db_connection"
> More details: https://err.sh/now-cli/env-no-secret

Frankly, glitch is far easier, all I need, I think, is to figure out is the db connection. Thanks for your help.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
j2lcommented, Apr 5, 2019

Haaa, “-” vs “_”, I didn’t see it! I followed your glitch way and had no server error and the example page working!

So, I tested the same process with my db but next build didn’t created the results collection and running the web server throws the error:

Error: timeout of 8000ms exceeded
    at e.exports (showResult.js:1)
    at XMLHttpRequest.m.ontimeout (showResult.js:1)
(anonymous) @ main-aa2e1625697cbd4bcfc1.js:10
58a70606a835c400c8b38e84:1 Failed to load resource: the server responded with a status of 500 ()
The FetchEvent for "https://alheimsins-bigfive-web.glitch.me:3000/api/get/58a70606a835c400c8b38e84" resulted in a network error response: an object that was not a Response was passed to respondWith().

So, it’s the collection creation that is not working somehow. I guess at the next build stage.

I also tried with now-win (“Welcome to now way” 😃 ) but got a glitch (ok, I stop with puns):

> Success! Secret b5_db_connection added (zeitco14) [561ms]
PS E:\bigfive-web> .\now-win.exe
> WARN! You are using an old version of the Now Platform. More: https://zeit.co/docs/v1-upgrade
> Deploying E:\bigfive-web under zeitco14
> Using project bigfive-web
> Error! You tried to create a Now 1.0 deployment. Please use Now 2.0 instead: https://zeit.co/upgrade

Sooo, back to square one.

BTW, I was surprised your credentials are working, I expected an error. So, I made a copy of the test collection on my mLab account. And now it’s working on glitch. It’s definitely a collection creation issue.

If I make the collection manually it works, so I’m fine.

0reactions
maccybercommented, Apr 4, 2019

Thanks for a great guide and your interest @j2l.

About now try now-win.exe secrets add b5_db_connection "username:password@ds32165.mlab.com:25574/db

With underscore instead of hyphen.

About glitch

.env file only gets read in dev environments.

Try to paste this directly in config.js in the project root.

module.exports = {
  JWT_SECRET: process.env.JWT_SECRET || 'Gibberish, jibberish, jibber-jabber and gobbledygook',
  DB_CONNECTION: process.env.DB_CONNECTION || 'hacktoberfest:hacktoberfest1@ds153659.mlab.com:53659/bigfive',
  DB_COLLECTION: process.env.DB_COLLECTION || 'test',
  URL: process.env.URL || 'https://alheimsins-bigfive-web.glitch.me'
}

Then presumably next build

Try the database connection easily by navigate to https://alheimsins-bigfive-web.glitch.me/result/58a70606a835c400c8b38e84

And look in the console for errors.

The test-database should contain the 58a70606a835c400c8b38e84 reference.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Glitch Lab App Free Download Tutorial On Android App Easy ...
In this video, I'll show you how to use Glitch Lab tht you can get from playstoreLINK: ... Your browser can't play this...
Read more >
is Glitch Lab not working / having issues for you? - mwallpapers
Try Hard reboot in your Android mobile. Press and hold down the "Home" and "Power" buttons at the same time for upto 10...
Read more >
is Glitch Lab Pro not working / having issues for you? - 99images
Do you have Glitch Lab Pro app problems? We have instructions to fix the not ... If you don't have enough space in...
Read more >
Glitch Lab - Apps on Google Play
Glitch Lab brings well known effects as well as novel ideas to the world of digital glitch art, following the philosophy of simplicity,...
Read more >
Solved: Game is stuck "installing" and cannot bypass or ca...
He's able to play other downloaded games already on his quest but can't do anything else as they become "queued" behind the installation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found