How to trasfer a Heroku domain?

I have a host and domain in heroku with the plugin PointDNS, I need to transfer my domain to another host, How I do that?

mysql – How do I use sequelize npm package to access an existing table in a remote heroku cleardb database without defining its schema in my app

In the sequelize docs Im unable to find the suitable way to get a handle on a table in a remote database. Only way currently (as mentioned in the docs) to use the models ORM way of syntax to query or manipulate data in a remote database seems to be to first define its schema in my app itself and then persist it first to get a hold of it so that we can query the existing data. I basically do not want to use sequelize.models.query method and mention my sql query explicitly like

sequelize.models.query("SELECT * FROM <tablename>" )

and run it. But rather want to use the ORM methods of querying the data something like

await <table_name>.findAll({
        where: {
          userid: id
        }
});

References:

https://sequelize.org/master/index.html

https://github.com/sequelize/sequelize

Renaming properly a heroku app in a way that the previous link is not working

I have a Heroku app that I want to rename so that when someone uses the previous link –> no page is shown – is this possible?

python – Selenium Webdriver Timeout Exception on Heroku and Pythonanywhere both

i am working on an project in which my script takes screenshot of tweet code is working on local server but i am getting timeout exception error on heroku and pythonanywhere both platforms.. i have tried changing code many times, this is the code i have uploaded on heroku attached to this question

from flask import Flask, render_template, request, url_for, redirect,session,send_file
from selenium import webdriver
import os
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument('--headless')
chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN")


app = Flask(__name__,
            static_url_path='', 
            static_folder='static',
            template_folder='templates'
)
app.config('SEND_FILE_MAX_AGE_DEFAULT') = 0
app.secret_key = "Super Secret Key"

@app.route('/')
def index():
   if 'success' in session:
      session.pop('success',None)
      return render_template('index.html',success=True)
   elif 'error' in session:
      session.pop('error',None)
      return render_template('index.html',error=True)
   elif 'file' in session:
      session.pop('file',None)
      return send_file("static/images/screenshot.png",as_attachment=True)
   else:
      return render_template('index.html')

@app.route('/check',methods = ('POST', 'GET'))
def check():
   if request.method == 'POST':
      try:
         download = request.form('auto_download')
         download = True
      except:
         download = False
      try:
         driver = webdriver.Chrome(executable_path=os.environ.get("CHROMEDRIVER_PATH"),options=chrome_options)
         url = request.form('url')
         #driver.implicitly_wait(30)
         driver.get(url)
         wait = WebDriverWait(driver, 10)
         element = wait.until(EC.element_to_be_clickable((By.TAG_NAME, 'article')))
         elem = driver.find_element_by_tag_name("article")
         elem.screenshot("static/images/screenshot.png")
         driver.close()
         if download == True:
            session('file') = "True"
            return redirect(url_for("index"))
         else:
            session('success') = "True"
            return redirect(url_for("index"))
      except Exception as err:
         return f"{err.__class__.__name__}: {err}"
         #session('error') = "True"
         #return redirect(url_for("index"))
   else:
      return redirect(url_for('index'))


if __name__ == '__main__':
   app.run()

javascript – Problema ao executar um bot nodeJS hospedado no Heroku

Estou estudando sobre web scraping e desenvolvi um bot em nodeJS utilizando a biblioteca puppeteer.
A função do bot é verificar a cada 5 minutos um determinado canal do YouTube e caso tenha vídeo novo ele me envia um email utilizando a biblioteca nodemailer. Segui alguns tutoriais de como hospedar um bot no Heroku, mas quando eu tento executar apresenta isso:

Erro ao tentar executar o bot hospedado no Heroku

Quando executo esse comando da imagem no terminal isso é mostrado:

2020-11-02T20:36:45.332418+00:00 app(web.1): 
2020-11-02T20:36:45.332418+00:00 app(web.1): 
2020-11-02T20:36:45.332419+00:00 app(web.1): TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
2020-11-02T20:36:45.332419+00:00 app(web.1): 
2020-11-02T20:36:45.332419+00:00 app(web.1): at onClose (/app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
2020-11-02T20:36:45.332420+00:00 app(web.1): at Interface.<anonymous> (/app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)
2020-11-02T20:36:45.332421+00:00 app(web.1): at Interface.emit (events.js:326:22)
2020-11-02T20:36:45.332421+00:00 app(web.1): at Interface.close (readline.js:416:8)
2020-11-02T20:36:45.332422+00:00 app(web.1): at Socket.onend (readline.js:194:10)
2020-11-02T20:36:45.332422+00:00 app(web.1): at Socket.emit (events.js:326:22)
2020-11-02T20:36:45.332423+00:00 app(web.1): at endReadableNT (_stream_readable.js:1223:12)
2020-11-02T20:36:45.332424+00:00 app(web.1): at processTicksAndRejections (internal/process/task_queues.js:84:21)
2020-11-02T20:36:45.332741+00:00 app(web.1): (node:23) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
2020-11-02T20:36:45.332865+00:00 app(web.1): (node:23) (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.
2020-11-02T20:37:42.172980+00:00 heroku(web.1): Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2020-11-02T20:37:42.197857+00:00 heroku(web.1): Stopping process with SIGKILL
2020-11-02T20:37:42.286332+00:00 heroku(web.1): Process exited with status 137
2020-11-02T20:37:42.337590+00:00 heroku(web.1): State changed from starting to crashed
2020-11-03T02:20:48.790033+00:00 heroku(web.1): State changed from crashed to starting
2020-11-03T02:20:59.778419+00:00 heroku(web.1): Starting process with command `npm start`
2020-11-03T02:21:02.807241+00:00 app(web.1): 
2020-11-03T02:21:02.807731+00:00 app(web.1): > projeto-yt-68@1.0.0 start /app
2020-11-03T02:21:02.807732+00:00 app(web.1): > node app.js
2020-11-03T02:21:02.807732+00:00 app(web.1): 
2020-11-03T02:21:03.292572+00:00 app(web.1): (node:23) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
2020-11-03T02:21:03.292580+00:00 app(web.1): /app/node_modules/puppeteer/.local-chromium/linux-809590/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
2020-11-03T02:21:03.292582+00:00 app(web.1): 
2020-11-03T02:21:03.292582+00:00 app(web.1): 
2020-11-03T02:21:03.292583+00:00 app(web.1): TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
2020-11-03T02:21:03.292583+00:00 app(web.1): 
2020-11-03T02:21:03.292583+00:00 app(web.1): at onClose (/app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
2020-11-03T02:21:03.292584+00:00 app(web.1): at Interface.<anonymous> (/app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)
2020-11-03T02:21:03.292585+00:00 app(web.1): at Interface.emit (events.js:326:22)
2020-11-03T02:21:03.292586+00:00 app(web.1): at Interface.close (readline.js:416:8)
2020-11-03T02:21:03.292586+00:00 app(web.1): at Socket.onend (readline.js:194:10)
2020-11-03T02:21:03.292587+00:00 app(web.1): at Socket.emit (events.js:326:22)
2020-11-03T02:21:03.292587+00:00 app(web.1): at endReadableNT (_stream_readable.js:1223:12)
2020-11-03T02:21:03.292589+00:00 app(web.1): at processTicksAndRejections (internal/process/task_queues.js:84:21)
2020-11-03T02:21:03.293348+00:00 app(web.1): (node:23) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
2020-11-03T02:21:03.293550+00:00 app(web.1): (node:23) (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.
2020-11-03T02:22:00.253190+00:00 heroku(web.1): Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2020-11-03T02:22:00.276047+00:00 heroku(web.1): Stopping process with SIGKILL
2020-11-03T02:22:00.359072+00:00 heroku(web.1): Process exited with status 137
2020-11-03T02:22:00.406252+00:00 heroku(web.1): State changed from starting to crashed
2020-11-03T08:06:25.428015+00:00 heroku(web.1): State changed from crashed to starting
2020-11-03T08:06:33.832606+00:00 heroku(web.1): Starting process with command `npm start`
2020-11-03T08:06:36.274883+00:00 app(web.1): 
2020-11-03T08:06:36.274907+00:00 app(web.1): > projeto-yt-68@1.0.0 start /app
2020-11-03T08:06:36.274907+00:00 app(web.1): > node app.js
2020-11-03T08:06:36.274908+00:00 app(web.1): 
2020-11-03T08:06:36.591916+00:00 app(web.1): (node:23) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
2020-11-03T08:06:36.591935+00:00 app(web.1): /app/node_modules/puppeteer/.local-chromium/linux-809590/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
2020-11-03T08:06:36.591936+00:00 app(web.1): 
2020-11-03T08:06:36.591936+00:00 app(web.1): 
2020-11-03T08:06:36.591936+00:00 app(web.1): TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
2020-11-03T08:06:36.591936+00:00 app(web.1): 
2020-11-03T08:06:36.591936+00:00 app(web.1): at onClose (/app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
2020-11-03T08:06:36.591937+00:00 app(web.1): at Interface.<anonymous> (/app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)
2020-11-03T08:06:36.591937+00:00 app(web.1): at Interface.emit (events.js:326:22)
2020-11-03T08:06:36.591937+00:00 app(web.1): at Interface.close (readline.js:416:8)
2020-11-03T08:06:36.591938+00:00 app(web.1): at Socket.onend (readline.js:194:10)
2020-11-03T08:06:36.591938+00:00 app(web.1): at Socket.emit (events.js:326:22)
2020-11-03T08:06:36.591938+00:00 app(web.1): at endReadableNT (_stream_readable.js:1223:12)
2020-11-03T08:06:36.591939+00:00 app(web.1): at processTicksAndRejections (internal/process/task_queues.js:84:21)
2020-11-03T08:06:36.596952+00:00 app(web.1): (node:23) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
2020-11-03T08:06:36.596976+00:00 app(web.1): (node:23) (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.
2020-11-03T08:07:34.419644+00:00 heroku(web.1): Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2020-11-03T08:07:34.437542+00:00 heroku(web.1): Stopping process with SIGKILL
2020-11-03T08:07:34.564571+00:00 heroku(web.1): Process exited with status 137
2020-11-03T08:07:34.726950+00:00 heroku(web.1): State changed from starting to crashed
2020-11-03T13:58:41.605874+00:00 heroku(web.1): State changed from crashed to starting
2020-11-03T13:58:50.642172+00:00 heroku(web.1): Starting process with command `npm start`
2020-11-03T13:58:53.361408+00:00 app(web.1): 
2020-11-03T13:58:53.361424+00:00 app(web.1): > projeto-yt-68@1.0.0 start /app
2020-11-03T13:58:53.361424+00:00 app(web.1): > node app.js
2020-11-03T13:58:53.361424+00:00 app(web.1): 
2020-11-03T13:58:53.731167+00:00 app(web.1): (node:23) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
2020-11-03T13:58:53.731209+00:00 app(web.1): /app/node_modules/puppeteer/.local-chromium/linux-809590/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
2020-11-03T13:58:53.731211+00:00 app(web.1): 
2020-11-03T13:58:53.731211+00:00 app(web.1): 
2020-11-03T13:58:53.731211+00:00 app(web.1): TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
2020-11-03T13:58:53.731212+00:00 app(web.1): 
2020-11-03T13:58:53.731212+00:00 app(web.1): at onClose (/app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
2020-11-03T13:58:53.731213+00:00 app(web.1): at Interface.<anonymous> (/app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)
2020-11-03T13:58:53.731214+00:00 app(web.1): at Interface.emit (events.js:326:22)
2020-11-03T13:58:53.731215+00:00 app(web.1): at Interface.close (readline.js:416:8)
2020-11-03T13:58:53.731215+00:00 app(web.1): at Socket.onend (readline.js:194:10)
2020-11-03T13:58:53.731215+00:00 app(web.1): at Socket.emit (events.js:326:22)
2020-11-03T13:58:53.731216+00:00 app(web.1): at endReadableNT (_stream_readable.js:1223:12)
2020-11-03T13:58:53.731217+00:00 app(web.1): at processTicksAndRejections (internal/process/task_queues.js:84:21)
2020-11-03T13:58:53.734094+00:00 app(web.1): (node:23) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
2020-11-03T13:58:53.734098+00:00 app(web.1): (node:23) (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.
2020-11-03T13:59:51.047270+00:00 heroku(web.1): Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2020-11-03T13:59:51.074244+00:00 heroku(web.1): Stopping process with SIGKILL
2020-11-03T13:59:51.155437+00:00 heroku(web.1): Process exited with status 137

postgresql – Conectarse a la db postgres en produccion heroku

estoy intentando conectar a la base de datos que tengo en produccion(heroku) desde mi pc con pgadmin, se supone que debo pasar las credenciales que me da heroku para crear una coneccion a esa bd todo bien cuando creo un nuevo server con esas credenciales, pero cuando me abre me toma 2500 databases y si intento conectar a una me aparece el siguiente error:

    FATAL: permission denied for database "awdo2od23"
    DETAIL: User does not have CONNECT privilege.

Las credenciales que se usan son las siguientes:

- Host
- Database
- User
- Port
- Password
- URI

email – How to compute a solution in the background after the page has been sent using Heroku?

We have a web application in which the user enters the input to some computational problem, sends it to a server, and the server calculates and returns the result. For some inputs, the calculation takes a long time, so the server returns a page saying “I am working on it”, and continues working on it in a background thread. When the solution is ready, the thread sends an email to the user.

This worked well on a Linux server, but when we moved it to Heroku, it stopped working – we found out that, when the server returns a reply to the user, Heroku stops all threads, including the computation thread.

What is the correct way to implement this scheme in Heroku?

node.js – heroku not loading favicon.ico of mern project in production

I am trying to put app on production and get this error from heroku.
error Screen Page

I tried many types of practices given all around the internet.
I am new to heroku deployment and dont know much of it .

Hope this Helps .

react : Package.json

{
"name": "app",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:5000",
"dependencies": {
    "@material-ui/core": "^4.11.0",
    "@material-ui/icons": "^4.9.1",
    "@material-ui/lab": "^4.0.0-alpha.56",
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "@types/react-redux": "^7.1.9",
    "axios": "^0.20.0",
    "cra-template": "^1.0.3",
    "node-fetch": "^2.6.1",
    "query-string": "^6.13.5",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-highlight": "^0.12.0",
    "react-html-parser": "^2.0.2",
    "react-quill": "^1.3.5",
    "react-redux": "^7.2.1",
    "react-router-dom": "^5.2.0",
    "react-scripts": "3.4.3",
    "redux": "^4.0.5",
    "redux-thunk": "^2.3.0"
},
"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
},
"eslintConfig": {
    "extends": "react-app"
},
"browserslist": {
    "production": (
        ">0.2%",
        "not dead",
        "not op_mini all"
    ),
    "development": (
        "last 1 chrome version",
        "last 1 firefox version",
        "last 1 safari version"
    )
},
"description": "This project was bootstrapped with (Create React App)(https://github.com/facebook/create-react-app).",
"main": "index.js",
"devDependencies": {},
"repository": {
    "type": "git",
    "url": "git+https://github.com/kunalkumar007/moriox.tech.git"
},
"keywords": (),
"author": "",
"license": "ISC",
"bugs": {
    "url": "https://github.com/kunalkumar007/moriox.tech/issues"
}

}

node.js: Package.json

{
"name": "Moriox",
"version": "1.0.0",
"description": "Question Answer Website",
"main": "server.js",
"engines": {
    "node": "14.x",
    "yarn": "1.x"
},
"scripts": {
    "dev": "nodemon --watch backend  --exec babel-node backend/server.js",
    "start": "babel-node ./backend/server.js",
    "install-client": "cd app && yarn install",
    "build": "rm -rf dist && babel backend -d dist  && cd app && yarn install && npm run build",
    "heroku-postbuild": "npm run build && cd app && yarn install && npm run build"
},
"keywords": (),
"author": "",
"license": "ISC",
"dependencies": {
    "@babel/node": "^7.12.1",
    "@babel/polyfill": "^7.12.1",
    "@babel/preset-env": "^7.12.1",
    "bcryptjs": "^2.4.3",
    "body-parser": "^1.19.0",
    "cors": "^2.8.5",
    "express": "^4.17.1",
    "jsonwebtoken": "^8.5.1",
    "mongoose": "^5.10.9"
},
"devDependencies": {
    "@babel/cli": "^7.12.1",
    "@babel/core": "^7.12.3",
    "@babel/preset-react": "^7.12.1",
    "nodemon": "^2.0.5"
}

}

index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <link rel="icon" href="%PUBLIC_URL%/logo2.png" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta name="description" content="Web site created using create-react-app" />
    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo2.png" />
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
    <link rel="stylesheet" href="https://fonts.googleapis.com/css? 
family=Roboto:300,400,500,700&display=swap" />
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
    <title>Moriox</title>
</head>
<body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="root"></div>
    </body>
</html>

manifest.json

{
"short_name": "React App",
"name": "Create React App Sample",
"icons": (
    {
        "src": "logo2.png",
        "type": "image/png",
        "sizes": "192x192"
    },
    {
        "src": "logo2.png",
        "type": "image/png",
        "sizes": "512x512"
    }
),
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

I appreciate any help from you.
Thanks,

heroku – How to compute a solution in the background

We have a web application in which the user enters the input to some computational problem, sends it to a server, and the server calculates and returns the result. For some inputs, the calculation takes a long time, so the server returns a page saying “I am working on it”, and continues working on it in a background thread. When the solution is ready, the thread sends an email to the user.

This worked well on a Linux server, but when we moved it to Heroku, it stopped working – we found out that, when the server returns a reply to the user, Heroku stops all threads, including the computation thread.

What is the correct way to implement this scheme in Heroku?