alexdlaird / pyngrok

A Python wrapper for ngrok
https://pyngrok.readthedocs.io
MIT License
416 stars 59 forks source link

7.0.4: pytest fails in 20 units #125

Closed kloczek closed 6 months ago

kloczek commented 6 months ago

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

List of installed modules in build env: ```console Package Version ----------------------------- ------- alabaster 0.7.13 Babel 2.14.0 build 1.0.3 charset-normalizer 3.3.2 cppclean 0.13 distro 1.8.0 dnf 4.18.2 docutils 0.20.1 exceptiongroup 1.1.3 gpg 1.23.2 idna 3.6 imagesize 1.4.1 importlib-metadata 7.0.1 iniconfig 2.0.0 installer 0.7.0 Jinja2 3.1.2 libdnf 0.72.0 MarkupSafe 2.1.3 packaging 23.2 pluggy 1.3.0 psutil 5.9.5 Pygments 2.17.2 pyproject_hooks 1.0.0 pytest 7.4.3 python-dateutil 2.8.2 pytz 2023.3 PyYAML 6.0.1 requests 2.31.0 setuptools 69.0.3 six 1.16.0 snowballstemmer 2.2.0 Sphinx 7.1.2 sphinx-autodoc-typehints 1.25.2 sphinx-notfound-page 1.0.0 sphinxcontrib-applehelp 1.0.4 sphinxcontrib-devhelp 1.0.5 sphinxcontrib-htmlhelp 2.0.4 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.9 tomli 2.0.1 urllib3 1.26.18 wheel 0.42.0 zipp 3.17.0 ```
kloczek commented 6 months ago

In the same build env 7.0.3 passes pytest without any issues.

Here is pytest output: ```console + SETUPTOOLS_SCM_PRETEND_VERSION=7.0.4 + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pyngrok-7.0.4-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pyngrok-7.0.4-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0 rootdir: /home/tkloczko/rpmbuild/BUILD/pyngrok-7.0.4 collected 72 items tests/test_conf.py s [ 1%] tests/test_installer.py F.F..sF. [ 12%] tests/test_ngrok.py FFFF.FssssssFsFsFssFsFFs....Fssss.FFF...sss.F.. [ 77%] tests/test_process.py F.ssFFFFF...sFFF [100%] =================================== FAILURES =================================== ____________________ TestInstaller.test_config_provisioned _____________________ self = def test_config_provisioned(self): # GIVEN self.given_file_doesnt_exist(self.pyngrok_config_v3.config_path) self.assertFalse(os.path.exists(self.pyngrok_config_v3.config_path)) # WHEN > ngrok.connect(pyngrok_config=self.pyngrok_config_v3) tests/test_installer.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stdout call ----------------------------- ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:50+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=2ab358ecbcd3 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:50+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:50+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:50+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:50+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" _____________________ TestInstaller.test_installer_default _____________________ self = def test_installer_default(self): # GIVEN ngrok_path = os.path.join(conf.BIN_DIR, "default", installer.get_ngrok_bin()) config_path = os.path.join(self.config_dir, "config_default.yml") pyngrok_config = PyngrokConfig( ngrok_path=ngrok_path, config_path=config_path) self.given_file_doesnt_exist(pyngrok_config.ngrok_path) self.assertFalse(os.path.exists(pyngrok_config.ngrok_path)) # WHEN > ngrok.connect(pyngrok_config=pyngrok_config) tests/test_installer.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stdout call ----------------------------- ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:52+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=339178912fe5 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:52+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:52+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:52+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:52+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" _______________________ TestInstaller.test_installer_v3 ________________________ self = def test_installer_v3(self): # GIVEN self.given_file_doesnt_exist(self.pyngrok_config_v3.ngrok_path) self.assertFalse(os.path.exists(self.pyngrok_config_v3.ngrok_path)) # WHEN > ngrok.connect(pyngrok_config=self.pyngrok_config_v3) tests/test_installer.py:37: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stdout call ----------------------------- ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:56+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=a8e27ac2875b err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:56+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:56+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:56+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:56+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ____________________ TestNgrok.test_api_get_request_success ____________________ self = def test_api_get_request_success(self): # GIVEN > current_process = ngrok.get_ngrok_process(pyngrok_config=self.pyngrok_config_v3) tests/test_ngrok.py:263: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:57+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=a8e27ac2875b err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:57+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:57+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:57+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ________________ TestNgrok.test_api_request_delete_data_updated ________________ self = def test_api_request_delete_data_updated(self): # GIVEN > current_process = ngrok.get_ngrok_process(pyngrok_config=self.pyngrok_config_v3) tests/test_ngrok.py:299: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:57+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=c3775b69372c err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:57+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:57+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:57+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" _______________________ TestNgrok.test_api_request_fails _______________________ self = def test_api_request_fails(self): # GIVEN > current_process = ngrok.get_ngrok_process(pyngrok_config=self.pyngrok_config_v3) tests/test_ngrok.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:57+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=c3775b69372c err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:57+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:57+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:57+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:57+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" ___________________ TestNgrok.test_api_request_query_params ____________________ self = def test_api_request_query_params(self): # GIVEN tunnel_name = "tunnel (1)" > current_process = ngrok.get_ngrok_process(pyngrok_config=self.pyngrok_config_v3) tests/test_ngrok.py:277: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:58+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=272b65fa6d82 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:58+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:58+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:58+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ______________________ TestNgrok.test_api_request_timeout ______________________ self = def test_api_request_timeout(self): # GIVEN > current_process = ngrok.get_ngrok_process(pyngrok_config=self.pyngrok_config_v3) tests/test_ngrok.py:334: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:58+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=272b65fa6d82 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:58+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:58+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:58+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:58+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" ________________ TestNgrok.test_bind_tls_upgraded_to_schemes_v3 ________________ self = def test_bind_tls_upgraded_to_schemes_v3(self): # WHEN > url = ngrok.connect(bind_tls="both", pyngrok_config=self.pyngrok_config_v3).public_url tests/test_ngrok.py:195: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:59+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=2a56e1878850 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:59+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:59+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:59+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:59+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" _________________________ TestNgrok.test_connect_name __________________________ self = def test_connect_name(self): # WHEN > ngrok_tunnel = ngrok.connect(name="my-tunnel", pyngrok_config=self.pyngrok_config_v3) tests/test_ngrok.py:104: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:59+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=2a56e1878850 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:59+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:59+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:59+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:20:59+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" __________________________ TestNgrok.test_connect_v3 ___________________________ self = def test_connect_v3(self): # GIVEN self.assertEqual(len(process._current_processes.keys()), 0) self.assertEqual(len(ngrok._current_tunnels.keys()), 0) # WHEN > ngrok_tunnel = ngrok.connect("5000", pyngrok_config=self.pyngrok_config_v3) tests/test_ngrok.py:78: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:00+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=2a56e1878850 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:00+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:00+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:00+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:00+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" _________________________ TestNgrok.test_disconnect_v3 _________________________ self = def test_disconnect_v3(self): # GIVEN > url = ngrok.connect(pyngrok_config=self.pyngrok_config_v3).public_url tests/test_ngrok.py:226: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:00+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=cda5de0fbfb7 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:00+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:00+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:00+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:00+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" __________________________ TestNgrok.test_get_tunnels __________________________ self = def test_get_tunnels(self): # GIVEN > url = ngrok.connect(pyngrok_config=self.pyngrok_config_v3).public_url tests/test_ngrok.py:113: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:01+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=cda5de0fbfb7 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:01+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:01+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:01+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" _____________________________ TestNgrok.test_kill ______________________________ self = def test_kill(self): # GIVEN > ngrok.connect("5000", pyngrok_config=self.pyngrok_config_v3) tests/test_ngrok.py:244: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:01+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=29338a9e8fe2 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:01+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:01+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:01+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:01+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" _________________ TestNgrok.test_ngrok_tunnel_refresh_metrics __________________ self = def test_ngrok_tunnel_refresh_metrics(self): # GIVEN > current_process = ngrok.get_ngrok_process(pyngrok_config=self.pyngrok_config_v3) tests/test_ngrok.py:506: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:04+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=be6802421068 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:04+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:04+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:04+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:04+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" _____________________ TestNgrok.test_schemes_http_https_v3 _____________________ self = def test_schemes_http_https_v3(self): # WHEN > url = ngrok.connect(schemes=["http", "https"], pyngrok_config=self.pyngrok_config_v3).public_url tests/test_ngrok.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:05+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=be6802421068 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:05+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:05+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:05+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:05+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" ________________________ TestNgrok.test_schemes_http_v3 ________________________ self = def test_schemes_http_v3(self): # WHEN > url = ngrok.connect(schemes=["http"], pyngrok_config=self.pyngrok_config_v3).public_url tests/test_ngrok.py:168: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:05+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=41787fcfc8aa err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:05+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:05+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:05+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" _______________________ TestNgrok.test_schemes_https_v3 ________________________ self = def test_schemes_https_v3(self): # WHEN > url = ngrok.connect(schemes=["https"], pyngrok_config=self.pyngrok_config_v3).public_url tests/test_ngrok.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:06+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=41787fcfc8aa err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:06+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:06+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:06+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ______________ TestNgrok.test_upgrade_ngrok_config_file_v2_to_v3 _______________ self = def test_upgrade_ngrok_config_file_v2_to_v3(self): # GIVEN config_path = os.path.join(self.config_dir, "legacy_config.yml") installer.install_default_config(config_path, ngrok_version="v2") pyngrok_config_v3 = self.copy_with_updates(self.pyngrok_config_v3, config_path=config_path, ngrok_version="v3") self.given_ngrok_installed(self.pyngrok_config_v3) # WHEN with self.assertRaises(PyngrokError): ngrok.connect(pyngrok_config=pyngrok_config_v3) # GIVEN process.capture_run_process(pyngrok_config_v3.ngrok_path, ["config", "upgrade", "--config", pyngrok_config_v3.config_path]) # WHEN > ngrok.connect(pyngrok_config=pyngrok_config_v3) tests/test_ngrok.py:779: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: Error reading configuration file '/home/tkloczko/rpmbuild/BUILD/pyngrok-7.0.4/tests/.ngrok/legacy_config.yml': `version` property is required. ERROR: ERROR: If you're upgrading from an older version of ngrok, you can run: ERROR: ERROR: ngrok config upgrade ERROR: ERROR: to upgrade to the new format and add the version number. ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:06+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=a59d696096f6 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:06+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" _______________ TestProcess.test_log_event_callback_and_max_logs _______________ self = def test_log_event_callback_and_max_logs(self): # GIVEN self.given_ngrok_installed(self.pyngrok_config_v3) log_event_callback_mock = mock.MagicMock() pyngrok_config = self.copy_with_updates(self.pyngrok_config_v3, log_event_callback=log_event_callback_mock, max_logs=5) # WHEN > ngrok.connect(pyngrok_config=pyngrok_config) tests/test_process.py:307: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:07+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=a59d696096f6 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:07+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:07+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ___________ TestProcess.test_multiple_processes_same_binary_fails_v3 ___________ self = def test_multiple_processes_same_binary_fails_v3(self): # GIVEN self.given_ngrok_installed(self.pyngrok_config_v3) self.assertEqual(len(process._current_processes.keys()), 0) # WHEN > ngrok_process1 = process._start_process(self.pyngrok_config_v3) tests/test_process.py:254: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:07+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=c720ece54621 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:07+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:07+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:07+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:07+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" ______________________ TestProcess.test_no_monitor_thread ______________________ self = def test_no_monitor_thread(self): # GIVEN self.given_ngrok_installed(self.pyngrok_config_v3) pyngrok_config = self.copy_with_updates(self.pyngrok_config_v3, monitor_thread=False) # WHEN > ngrok.connect(pyngrok_config=pyngrok_config) tests/test_process.py:321: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:309: in connect api_url = get_ngrok_process(pyngrok_config).api_url pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:08+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=c720ece54621 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:08+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:08+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ____________________ TestProcess.test_process_external_kill ____________________ self = def test_process_external_kill(self): # GIVEN self.given_ngrok_installed(self.pyngrok_config_v3) > ngrok_process = process._start_process(self.pyngrok_config_v3) tests/test_process.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:08+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=448af7747e52 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:08+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:08+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:08+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:08+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" __________ TestProcess.test_process_external_kill_get_process_restart __________ self = def test_process_external_kill_get_process_restart(self): # GIVEN self.given_ngrok_installed(self.pyngrok_config_v3) > ngrok_process1 = process._start_process(self.pyngrok_config_v3) tests/test_process.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:09+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=448af7747e52 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:09+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:09+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ________________________ TestProcess.test_process_logs _________________________ self = def test_process_logs(self): # GIVEN self.given_ngrok_installed(self.pyngrok_config_v3) # WHEN > ngrok_process = process._start_process(self.pyngrok_config_v3) tests/test_process.py:270: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:09+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=3ecb70049888 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:09+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:09+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ________________ TestProcess.test_start_process_port_in_use_v3 _________________ self = def test_start_process_port_in_use_v3(self): # GIVEN self.given_ngrok_installed(self.pyngrok_config_v3) self.assertEqual(len(process._current_processes.keys()), 0) > ngrok_process = process._start_process(self.pyngrok_config_v3) tests/test_process.py:81: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stdout call ----------------------------- ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:11+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=3dcc1538de83 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:11+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:11+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:11+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:11+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" _____________________ TestProcess.test_stop_monitor_thread _____________________ self = def test_stop_monitor_thread(self): # GIVEN self.given_ngrok_installed(self.pyngrok_config_v3) > current_process = ngrok.get_ngrok_process(pyngrok_config=self.pyngrok_config_v3) tests/test_process.py:330: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok/ngrok.py:153: in get_ngrok_process return process.get_process(pyngrok_config) pyngrok/process.py:234: in get_process return _start_process(pyngrok_config) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:12+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=384724c80f24 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:12+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:12+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:12+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" WARNING pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:12+0000 lvl=warn msg="failed to check for update" obj=updater err="Post \"https://update.equinox.io/check\": context canceled" ______________________ TestProcess.test_terminate_process ______________________ self = def test_terminate_process(self): # GIVEN self.given_ngrok_installed(self.pyngrok_config_v3) > ngrok_process = process._start_process(self.pyngrok_config_v3) tests/test_process.py:24: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyngrok_config = def _start_process(pyngrok_config: PyngrokConfig) -> NgrokProcess: """ Start a ``ngrok`` process with no tunnels. This will start the ``ngrok`` web interface, against which HTTP requests can be made to create, interact with, and destroy tunnels. :param pyngrok_config: The ``pyngrok`` configuration to use when interacting with the ``ngrok`` binary. :return: The ``ngrok`` process. """ config_path = conf.get_config_path(pyngrok_config) _validate_path(pyngrok_config.ngrok_path) _validate_config(config_path) start = [pyngrok_config.ngrok_path, "start", "--none", "--log=stdout"] if pyngrok_config.config_path: logger.info("Starting ngrok with config file: {}".format(pyngrok_config.config_path)) start.append("--config={}".format(pyngrok_config.config_path)) if pyngrok_config.auth_token: logger.info("Overriding default auth token") start.append("--authtoken={}".format(pyngrok_config.auth_token)) if pyngrok_config.region: logger.info("Starting ngrok in region: {}".format(pyngrok_config.region)) start.append("--region={}".format(pyngrok_config.region)) popen_kwargs: Dict[str, Any] = {"stdout": subprocess.PIPE, "universal_newlines": True} if os.name == "posix": popen_kwargs.update(start_new_session=pyngrok_config.start_new_session) elif pyngrok_config.start_new_session: logger.warning("Ignoring start_new_session=True, which requires POSIX") proc = subprocess.Popen(start, **popen_kwargs) atexit.register(_terminate_process, proc) logger.debug("ngrok process starting with PID: {}".format(proc.pid)) ngrok_process = NgrokProcess(proc, pyngrok_config) _current_processes[pyngrok_config.ngrok_path] = ngrok_process timeout = time.time() + pyngrok_config.startup_timeout while time.time() < timeout: if proc.stdout is None: logger.debug("No stdout when starting the process, this may or may not be an issue") break line = proc.stdout.readline() ngrok_process._log_startup_line(line) if ngrok_process.healthy(): logger.debug("ngrok process has started with API URL: {}".format(ngrok_process.api_url)) ngrok_process.startup_error = None if pyngrok_config.monitor_thread: ngrok_process.start_monitor_thread() break elif ngrok_process.proc.poll() is not None: break if not ngrok_process.healthy(): # If the process did not come up in a healthy state, clean up the state kill_process(pyngrok_config.ngrok_path) if ngrok_process.startup_error is not None: > raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), ngrok_process.logs, ngrok_process.startup_error) E pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n. pyngrok/process.py:395: PyngrokNgrokError ----------------------------- Captured stderr call ----------------------------- ERROR: authentication failed: Usage of ngrok requires a verified account and authtoken. ERROR: ERROR: Sign up for an account: https://dashboard.ngrok.com/signup ERROR: Install your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken ERROR: ERROR: ERR_NGROK_4018 ERROR: ------------------------------ Captured log call ------------------------------- ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:12+0000 lvl=eror msg="failed to reconnect session" obj=tunnels.session obj=csess id=384724c80f24 err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:12+0000 lvl=eror msg="session closing" obj=tunnels.session err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" ERROR pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:12+0000 lvl=eror msg="terminating with error" obj=app err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" CRITICAL pyngrok.process.ngrok:process.py:99 t=2023-12-28T01:21:12+0000 lvl=crit msg="command failed" err="authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n" =========================== short test summary info ============================ SKIPPED [1] tests/test_conf.py:13: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_installer.py:17: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:389: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:406: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:677: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:127: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:153: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:140: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:447: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:40: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:471: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:202: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:488: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:702: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:613: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:425: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:346: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:368: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:725: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:523: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_ngrok.py:563: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_process.py:167: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_process.py:228: NGROK_AUTHTOKEN environment variable not set SKIPPED [1] tests/test_process.py:36: NGROK_AUTHTOKEN environment variable not set FAILED tests/test_installer.py::TestInstaller::test_config_provisioned - pyng... FAILED tests/test_installer.py::TestInstaller::test_installer_default - pyngr... FAILED tests/test_installer.py::TestInstaller::test_installer_v3 - pyngrok.ex... FAILED tests/test_ngrok.py::TestNgrok::test_api_get_request_success - pyngrok... FAILED tests/test_ngrok.py::TestNgrok::test_api_request_delete_data_updated FAILED tests/test_ngrok.py::TestNgrok::test_api_request_fails - pyngrok.excep... FAILED tests/test_ngrok.py::TestNgrok::test_api_request_query_params - pyngro... FAILED tests/test_ngrok.py::TestNgrok::test_api_request_timeout - pyngrok.exc... FAILED tests/test_ngrok.py::TestNgrok::test_bind_tls_upgraded_to_schemes_v3 FAILED tests/test_ngrok.py::TestNgrok::test_connect_name - pyngrok.exception.... FAILED tests/test_ngrok.py::TestNgrok::test_connect_v3 - pyngrok.exception.Py... FAILED tests/test_ngrok.py::TestNgrok::test_disconnect_v3 - pyngrok.exception... FAILED tests/test_ngrok.py::TestNgrok::test_get_tunnels - pyngrok.exception.P... FAILED tests/test_ngrok.py::TestNgrok::test_kill - pyngrok.exception.PyngrokN... FAILED tests/test_ngrok.py::TestNgrok::test_ngrok_tunnel_refresh_metrics - py... FAILED tests/test_ngrok.py::TestNgrok::test_schemes_http_https_v3 - pyngrok.e... FAILED tests/test_ngrok.py::TestNgrok::test_schemes_http_v3 - pyngrok.excepti... FAILED tests/test_ngrok.py::TestNgrok::test_schemes_https_v3 - pyngrok.except... FAILED tests/test_ngrok.py::TestNgrok::test_upgrade_ngrok_config_file_v2_to_v3 FAILED tests/test_process.py::TestProcess::test_log_event_callback_and_max_logs FAILED tests/test_process.py::TestProcess::test_multiple_processes_same_binary_fails_v3 FAILED tests/test_process.py::TestProcess::test_no_monitor_thread - pyngrok.e... FAILED tests/test_process.py::TestProcess::test_process_external_kill - pyngr... FAILED tests/test_process.py::TestProcess::test_process_external_kill_get_process_restart FAILED tests/test_process.py::TestProcess::test_process_logs - pyngrok.except... FAILED tests/test_process.py::TestProcess::test_start_process_port_in_use_v3 FAILED tests/test_process.py::TestProcess::test_stop_monitor_thread - pyngrok... FAILED tests/test_process.py::TestProcess::test_terminate_process - pyngrok.e... ================== 28 failed, 20 passed, 24 skipped in 25.15s ================== ```
alexdlaird commented 6 months ago

I'll explain this a bit more in depth here, that way if/when other tickets come in with similar issues, I can reference this ticket for the explanation once.

There is no functional change between 7.0.3 and 7.0.4, just the ability to set NGROK_AUTHTOKEN from the environment. Everything else in the diff is build improvements.

So, what did change between 7.0.3 and 7.0.4? It's environmental from the ngrok service, not the pyngrok library. Your test failures are all failing (and skipped) for the same reason and telling you why: pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: authentication failed: Usage of ngrok requires a verified account and authtoken.\n\nSign up for an account: https://dashboard.ngrok.com/signup\nInstall your authtoken: https://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_4018\r\n.

Around December 20th, 2023 (or therabouts), ngrok stopped allowing anonymous usage to its service, and requires all usage of its APIs and binaries to use an auth token. Though your 7.0.3 build previously worked, if you reran it after this date, it would fail with the same error as you're seeing now running against 7.0.4. This is actually why 7.0.4 was released, so that developers could easily set the auth token from an environment variable without having to change anything in their code.

The solution: set NGROK_AUTHTOKEN in your environment with your auth token found at https://dashboard.ngrok.com/get-started/your-authtoken, then rerun your build.

kloczek commented 6 months ago

Issue is that units which requires access to public network like in many other modules should be possible to skip over network pytest mark. Most of the distributions build infras are intentionally cut off from access to the public network.

alexdlaird commented 6 months ago

That is a problem with the nature of pyngrok's test suite, that to validate there are no regressions, we have to connect to the ngrok service, and we have to use an auth token. This same "issue" would have existed in all versions of pyngrok before 7.0.4 too though, the fact is it's an integration test suite and not a unit test suite, since it's a library that's dependent on an external, internet-connected service.

I've considered making a subset smoke suite of true unit tests that mock out the third party responses, this would also resolve the issue we see with pull request builds not working since GitHub doesn't share the auth token secret to pull requests, but the fact is there hasn't been a huge need for it (compared to the work it'd be to do it) to this point. I'd of course consider a pull request that attempted this, but like I said, I know it wouldn't be a small effort to make that change.

kloczek commented 6 months ago

I fully understand situation however part of the units do not need network access and IMO it would be nice to to have possibility to exclude automatically such units depends on configuration of build system. Simple sometimes "something it is better than nothing".

alexdlaird commented 6 months ago

Can you try running your build against the develop branch? Since ngrok made their change last week, all the new tests that now also require an auth token are skipped. If that works for you, I can merge it in later this week and cut a 7.0.5 that I think will accomplish what you want.

kloczek commented 6 months ago

Result against 7.0.4 + three commits from branch

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pyngrok-7.0.4-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pyngrok-7.0.4-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pyngrok-7.0.4
collected 72 items

tests/test_conf.py s                                                                                                                                                                  [  1%]
tests/test_installer.py s.s..ss.                                                                                                                                                      [ 12%]
tests/test_ngrok.py ssss.sssssssssssssssssss....sssss.sss...sss.s..                                                                                                                   [ 77%]
tests/test_process.py s.sssssss...ssss                                                                                                                                                [100%]

================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_conf.py:13: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_installer.py:68: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_installer.py:47: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_installer.py:17: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_installer.py:32: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:259: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:297: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:315: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:273: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:334: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:392: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:409: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:681: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:129: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:149: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:139: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:189: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:450: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:102: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:40: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:71: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:474: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:199: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:220: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:491: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:112: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:239: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:706: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:507: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:617: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:428: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:349: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:371: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:179: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:159: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:169: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:729: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:527: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:567: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_ngrok.py:765: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_process.py:299: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_process.py:170: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_process.py:228: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_process.py:246: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_process.py:316: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_process.py:117: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_process.py:141: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_process.py:264: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_process.py:37: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_process.py:77: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_process.py:329: NGROK_AUTHTOKEN environment variable not set
SKIPPED [1] tests/test_process.py:21: NGROK_AUTHTOKEN environment variable not set
============================================================================== 20 passed, 52 skipped in 6.30s ===============================================================================
kloczek commented 6 months ago

I think that it is enough 👍 😄

kloczek commented 6 months ago

Thx