Streetmerchant: Twilio Error with no values entered in .env

Created on 22 Nov 2020  Â·  6Comments  Â·  Source: jef/streetmerchant

Description

Error

[~] # docker run --cap-add=SYS_ADMIN -it --rm --env-file /share/Container/container-station-data/appdata/streetmerchant/config/.env ghcr.io/jef/streetmerchant:latest

> streetmerchant@ start:production /app
> node build/index.js

STREETMERCHANT
3.0.0

/app/node_modules/twilio/lib/rest/Twilio.js:140
    throw new Error('accountSid must start with AC');
    ^

Error: accountSid must start with AC
    at new Twilio (/app/node_modules/twilio/lib/rest/Twilio.js:140:11)
    at Object.<anonymous> (/app/build/notification/twilio.js:10:14)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/app/build/notification/notification.js:17:18)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! streetmerchant@ start:production: `node build/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the streetmerchant@ start:production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/appuser/.npm/_logs/2020-11-22T12_10_58_942Z-debug.log

.env

# ** All configuration variables are optional **
# Read https://github.com/jef/streetmerchant#customization for help on customizing this file
#############################################################################################

ASCII_BANNER=""
ASCII_COLOR=""
AUTO_ADD_TO_CART="true"
BROWSER_TRUSTED=""
COUNTRY="UK"
DESKTOP_NOTIFICATIONS=""
DISCORD_NOTIFY_GROUP=""
DISCORD_WEB_HOOK=""
EMAIL_PASSWORD=""
EMAIL_TO=""
EMAIL_USERNAME=""
HEADLESS="true"
IN_STOCK_WAIT_TIME="1"
LOG_LEVEL=""
LOW_BANDWIDTH="true"
MAX_PRICE_SERIES_3070="1"
MAX_PRICE_SERIES_3080="1"
MAX_PRICE_SERIES_3090="1000"
MAX_PRICE_SERIES_RX6800="1"
MAX_PRICE_SERIES_RX6800XT="650"
MAX_PRICE_SERIES_RX6900XT="800"
MAX_PRICE_SERIES_RYZEN5600="1"
MAX_PRICE_SERIES_RYZEN5800="1"
MAX_PRICE_SERIES_RYZEN5900="1"
MAX_PRICE_SERIES_RYZEN5950="751"
MICROCENTER_LOCATION=""
MQTT_BROKER_ADDRESS=""
MQTT_BROKER_PORT=""
MQTT_CLIENT_ID=""
MQTT_PASSWORD=""
MQTT_QOS=""
MQTT_TOPIC=""
MQTT_USERNAME=""
NVIDIA_ADD_TO_CART_ATTEMPTS=""
NVIDIA_SESSION_TTL=""
OPEN_BROWSER=""
PAGE_BACKOFF_MIN=""
PAGE_BACKOFF_MAX=""
PAGE_SLEEP_MIN=""
PAGE_SLEEP_MAX=""
PAGE_TIMEOUT=""
PAGERDUTY_INTEGRATION_KEY=""
PAGERDUTY_SEVERITY=""
PHILIPS_HUE_API_KEY=""
PHILIPS_HUE_CLOUD_ACCESS_TOKEN=""
PHILIPS_HUE_CLOUD_CLIENT_ID=""
PHILIPS_HUE_CLOUD_CLIENT_SECRET=""
PHILIPS_HUE_CLOUD_REFRESH_TOKEN=""
PHILIPS_HUE_LAN_BRIDGE_IP=""
PHILIPS_HUE_LIGHT_COLOR=""
PHILIPS_HUE_LIGHT_IDS=""
PHILIPS_HUE_LIGHT_PATTERN=""
PHONE_CARRIER=""
PHONE_NUMBER=""
PLAY_SOUND="Heartbeat-sound-effect.mp3"
PROXY_ADDRESS=""
PROXY_PORT=""
PUSHBULLET=""
PUSHOVER_TOKEN=""
PUSHOVER_USER=""
PUSHOVER_PRIORITY=""
SCREENSHOT=""
SHOW_ONLY_BRANDS=""
SHOW_ONLY_MODELS=""
SHOW_ONLY_SERIES=""
SLACK_CHANNEL=""
SLACK_TOKEN=""
SMTP_ADDRESS=""
SMTP_PORT=""
STORES="scan, amazon-uk, amd, box, currys, game, novatech, overclockers, very"
TELEGRAM_ACCESS_TOKEN=""
TELEGRAM_CHAT_ID=""
TWILIO_ACCOUNT_SID=""
TWILIO_AUTH_TOKEN=""
TWILIO_FROM_NUMBER=""
TWILIO_TO_NUMBER=""
TWITCH_ACCESS_TOKEN=""
TWITCH_CHANNEL=""
TWITCH_CLIENT_ID=""
TWITCH_CLIENT_SECRET=""
TWITCH_REFRESH_TOKEN=""
TWITTER_ACCESS_TOKEN_KEY=""
TWITTER_ACCESS_TOKEN_SECRET=""
TWITTER_CONSUMER_KEY=""
TWITTER_CONSUMER_SECRET=""
TWITTER_TWEET_TAGS=""
USER_AGENT=""
WEB_PORT=""

Possible solution

Tried to remove the Twilio lines in .env = stuck process
Tried to add random AC value for Twilio SID in .env = same failure.

bug

Most helpful comment

If you're using docker e.g. on a diskstation make sure you remove the quotes from your env values. otherwise they'll have additional quotes upon start.

also remove settings from env which you don't set to other than default.

All 6 comments

I know it isn't a fix, but if you don't use twilio or intend to use it in the future you can try to just remove the whole feature.

If you're using latest, it won't catch any updates that I do to fix this. In the meantime, I would remove

TWILIO_ACCOUNT_SID=""
TWILIO_AUTH_TOKEN=""
TWILIO_FROM_NUMBER=""
TWILIO_TO_NUMBER=""

from the .env. That should fix it. I would also remove all environment variables that you aren't using for now.

If you're using latest, it won't catch any updates that I do to fix this. In the meantime, I would remove

TWILIO_ACCOUNT_SID=""
TWILIO_AUTH_TOKEN=""
TWILIO_FROM_NUMBER=""
TWILIO_TO_NUMBER=""

from the .env. That should fix it. I would also remove all environment variables that you aren't using for now.

I tired removing and the process was stuck and wouldnt search.

Tried to remove the Twilio lines in .env = stuck process

I feel like I am having the same problem as you @AlphaOmega2020

If you're using docker e.g. on a diskstation make sure you remove the quotes from your env values. otherwise they'll have additional quotes upon start.

also remove settings from env which you don't set to other than default.

This is somewhat of a regression. I will work on this sometime in the coming weeks. But shouldn't be blocking!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

poly-mathic picture poly-mathic  Â·  5Comments

fabillopr picture fabillopr  Â·  3Comments

lngchn picture lngchn  Â·  3Comments

FawnPat picture FawnPat  Â·  4Comments

RealityMyx picture RealityMyx  Â·  3Comments