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

Getting this to run issue and deploying with zeit question/issue #128

Open
StephenEller86 opened this issue Mar 23, 2018 · 3 comments
Open

Comments

@StephenEller86
Copy link

StephenEller86 commented Mar 23, 2018

I got this to deploy, however it's acting strange,
it's starting to build okay, but gives me an error

(node:116) UnhandledPromiseRejectionWarning: OpenError: IO error: /home/nowuser/src/src/helpers/blacklistUsersDb/LOCK: No such file or directory
    at /home/nowuser/src/node_modules/levelup/lib/levelup.js:91:23
    at /home/nowuser/src/node_modules/abstract-leveldown/abstract-leveldown.js:41:14
    at /home/nowuser/src/node_modules/deferred-leveldown/deferred-leveldown.js:20:21
    at /home/nowuser/src/node_modules/abstract-leveldown/abstract-leveldown.js:41:14
    at /home/nowuser/src/node_modules/abstract-leveldown/abstract-leveldown.js:41:14
(node:116) 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: 1)
(node:116) [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.
No open port found. Make sure 'npm start' creates an HTTP server on a port (any).
More details: https://err.sh/now-cli/no-open-port-found
====================
TWEET COUNTER=100
====================
...

it seems to just loop with the tweet counter...

Any help would be appreciated!

Thanks!

@spences10
Copy link
Collaborator

spences10 commented Mar 24, 2018

This bot is deployed to Heroku @Toxxn, not Zeit's now, maybe this could be mentioned in the contributing guidelines if a user would like to deploy their own version of it @amandeepmittal.

The reason this uses Heroku is that the LevelDB database is stored locally with the bot. Now deployments are immutable meaning the filesystem can't be written to.

@spences10
Copy link
Collaborator

Just to go over what happens with the bot it uses a similar queuing system to delay tweet where any tweets that match the query string (#100daysofcode) instead of being tweeted out as soon as they are hit the stream they're added to an object and assigned a random time (defined in the .env file range) before being tweeted at the interval set.

The counter your seeing is possibly because nothing has come into the object that contains the tweets that have matched the search criteria.

@amandeepmittal
Copy link
Member

@spences 10 I will use your comment in the guidelines.

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

No branches or pull requests

3 participants