xerootg / cryze_v2

Making Wyze gwell cameras work as RTSP sources since 2024
GNU General Public License v3.0
11 stars 2 forks source link

400 Client Error: Bad Request for url: https://auth-prod.api.wyze.com/api/user/login #16

Open Cloud-121 opened 17 hours ago

Cloud-121 commented 17 hours ago

Hello ^^ It appears this is a similar issue to #13 I have checked my config file for the WYZE_EMAIL ENV. Would you have any idea on the error?

LOGS

root@cryze2:/home/cryze2/cryze_v2# docker logs cryze_v2-cryze_api-1 
Loaded .env file
warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
      Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[62]
      User profile is available. Using '/root/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[58]
      Creating key {0b24febb-366f-4df7-9028-ee74e8b5a37c} with creation date 2024-11-04 19:27:51Z, activation date 2024-11-04 19:27:51Z, and expiration date 2025-02-02 19:27:51Z.
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
      No XML encryptor configured. Key {0b24febb-366f-4df7-9028-ee74e8b5a37c} may be persisted to storage in unencrypted form.
info: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[39]
      Writing data to file '/root/.aspnet/DataProtection-Keys/key-0b24febb-366f-4df7-9028-ee74e8b5a37c.xml'.
warn: Microsoft.AspNetCore.Hosting.Diagnostics[15]
      Overriding HTTP_PORTS '8080' and HTTPS_PORTS ''. Binding to values defined by URLS instead 'http://+:8080'.
info: Cryze.API.Services.JsonCameraInfoService[0]
      Loaded 0 cameras from /data/data.json
info: Cryze.API.Services.JsonCameraInfoService[0]
      Getting Wyze API Credential
info: Cryze.API.Services.PythonServices[0]
      Found libpython3.*.so at /lib/x86_64-linux-gnu/libpython3.11.so
info: Cryze.API.Python.PythonRuntimeTask[0]
      system version: 3.11.2 (main, Aug 26 2024, 07:20:54) [GCC 12.2.0]
info: Cryze.API.Python.PythonRuntimeTask[0]
      system python_path: ['/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '/usr/local/lib/python3.11/dist-packages', '/usr/lib/python3/dist-packages', '/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.10/']
info: Cryze.API.Services.WyzeSdkService[0]
      Begin work on the main thread
info: Cryze.API.Services.WyzeSdkService[0]
      Got GIL
info: Cryze.API.Services.WyzeSdkService[0]
      Created scope
info: Cryze.API.Services.WyzeSdkService[0]
      Registered logger
info: Cryze.API.Services.JsonCameraInfoService[0]
      Getting Wyze API Credential
info: Cryze.API.PythonExtensions.PythonLogger[0]
      2024-11-04 19:27:52,163 - wyze_sdk.service.base - INFO - requesting POST to https://auth-prod.api.wyze.com/api/user/login
warn: Cryze.API.Services.WyzeSdkService[0]
      Failed to login to Wyze API, not saving token
warn: Cryze.API.Services.WyzeSdkService[0]
      Failed to get supported cameras
      Python.Runtime.PythonException: 400 Client Error: Bad Request for url: https://auth-prod.api.wyze.com/api/user/login
        File "/usr/local/lib/python3.11/dist-packages/requests/models.py", line 1024, in raise_for_status
          raise HTTPError(http_error_msg, response=self)
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 93, in _do_request
          response.raise_for_status()
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 106, in _do_request
          raise err
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 132, in do_post
          return self._do_request(client, req)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 204, in api_call
          return self.do_post(url=api_url, headers=headers, payload=json, params=params, method=http_verb)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 347, in api_call
          return super().api_call(
                 ^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/auth_service.py", line 58, in api_call
          return super().api_call(
                 ^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/auth_service.py", line 88, in user_login
          response = self.api_call(
                     ^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/api/client.py", line 185, in login
          response = self._auth_client().user_login(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         at Python.Runtime.PythonException.ThrowLastAsClrException()
         at Python.Runtime.PyObject.Invoke(PyTuple args, PyDict kw)
         at Python.Runtime.PyObject.InvokeMethod(String name, PyTuple args, PyDict kw)
         at Python.Runtime.PyObject.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
         at CallSite.Target(Closure, CallSite, Object, String, String, String, String)
         at System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
         at Cryze.API.Services.WyzeSdkService.DoLogin(PyModule scope, Object wyze_sdk_library) in /app/Services/WyzeSdkService.cs:line 113
         at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
         at Cryze.API.Services.WyzeSdkService.<>c__DisplayClass12_0.<GetSupportedCameras>b__0() in /app/Services/WyzeSdkService.cs:line 208
info: Cryze.API.Python.PythonRuntimeTask[0]
      Python task completed, rebinding PosixSignalHandler
info: Cryze.API.Python.PythonRuntimeTask[0]
      Rebinding PosixSignalHandler for Linux
info: Cryze.API.Python.PythonRuntimeTask[0]
      Locating OnPosixSignal method
info: Cryze.API.Python.PythonRuntimeTask[0]
      Found OnPosixSignal method
info: Cryze.API.Python.PythonRuntimeTask[0]
      Locating SetPosixSignalHandler method
info: Cryze.API.Python.PythonRuntimeTask[0]
      Found SetPosixSignalHandler method
info: Cryze.API.Python.PythonRuntimeTask[0]
      Rebinding PosixSignalHandler
info: Cryze.API.Python.PythonRuntimeTask[0]
      Rebound PosixSignalHandler
info: Cryze.API.Python.PythonRuntimeTask[0]
      PosixSignalHandler rebound
crit: Microsoft.AspNetCore.Hosting.Diagnostics[6]
      Application startup exception
      System.AggregateException: One or more errors occurred. (400 Client Error: Bad Request for url: https://auth-prod.api.wyze.com/api/user/login)
       ---> Python.Runtime.PythonException: 400 Client Error: Bad Request for url: https://auth-prod.api.wyze.com/api/user/login
        File "/usr/local/lib/python3.11/dist-packages/requests/models.py", line 1024, in raise_for_status
          raise HTTPError(http_error_msg, response=self)
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 93, in _do_request
          response.raise_for_status()
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 106, in _do_request
          raise err
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 132, in do_post
          return self._do_request(client, req)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 204, in api_call
          return self.do_post(url=api_url, headers=headers, payload=json, params=params, method=http_verb)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 347, in api_call
          return super().api_call(
                 ^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/auth_service.py", line 58, in api_call
          return super().api_call(
                 ^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/auth_service.py", line 88, in user_login
          response = self.api_call(
                     ^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/api/client.py", line 185, in login
          response = self._auth_client().user_login(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         at Python.Runtime.PythonException.ThrowLastAsClrException()
         at Python.Runtime.PyObject.Invoke(PyTuple args, PyDict kw)
         at Python.Runtime.PyObject.InvokeMethod(String name, PyTuple args, PyDict kw)
         at Python.Runtime.PyObject.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
         at CallSite.Target(Closure, CallSite, Object, String, String, String, String)
         at System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
         at Cryze.API.Services.WyzeSdkService.DoLogin(PyModule scope, Object wyze_sdk_library) in /app/Services/WyzeSdkService.cs:line 113
         at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
         at Cryze.API.Services.WyzeSdkService.<>c__DisplayClass12_0.<GetSupportedCameras>b__0() in /app/Services/WyzeSdkService.cs:line 208
      --- End of stack trace from previous location ---
         at Cryze.API.Services.WyzeSdkService.GetSupportedCameras() in /app/Services/WyzeSdkService.cs:line 249
         at Cryze.API.Services.WyzeSdkService.UpdateCameraList() in /app/Services/WyzeSdkService.cs:line 260
         at Cryze.API.Store.CameraStoreActivities.LoadWyzeSupportedCamerasAsync() in /app/Store/CameraStoreActivites.cs:line 92
         at Cryze.API.Store.CameraStoreActivities.RunStartupActivitiesAsync() in /app/Store/CameraStoreActivites.cs:line 46
         --- End of inner exception stack trace ---
         at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
         at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
         at System.Threading.Tasks.Task.Wait()
         at Cryze.API.Startup.Configure(IApplicationBuilder app) in /app/Startup.cs:line 51
         at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
         at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
         at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
         at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
         at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
fail: Microsoft.Extensions.Hosting.Internal.Host[11]
      Hosting failed to start
      System.AggregateException: One or more errors occurred. (400 Client Error: Bad Request for url: https://auth-prod.api.wyze.com/api/user/login)
       ---> Python.Runtime.PythonException: 400 Client Error: Bad Request for url: https://auth-prod.api.wyze.com/api/user/login
        File "/usr/local/lib/python3.11/dist-packages/requests/models.py", line 1024, in raise_for_status
          raise HTTPError(http_error_msg, response=self)
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 93, in _do_request
          response.raise_for_status()
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 106, in _do_request
          raise err
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 132, in do_post
          return self._do_request(client, req)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 204, in api_call
          return self.do_post(url=api_url, headers=headers, payload=json, params=params, method=http_verb)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/base.py", line 347, in api_call
          return super().api_call(
                 ^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/auth_service.py", line 58, in api_call
          return super().api_call(
                 ^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/service/auth_service.py", line 88, in user_login
          response = self.api_call(
                     ^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/dist-packages/wyze_sdk/api/client.py", line 185, in login
          response = self._auth_client().user_login(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         at Python.Runtime.PythonException.ThrowLastAsClrException()
         at Python.Runtime.PyObject.Invoke(PyTuple args, PyDict kw)
         at Python.Runtime.PyObject.InvokeMethod(String name, PyTuple args, PyDict kw)
         at Python.Runtime.PyObject.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
         at CallSite.Target(Closure, CallSite, Object, String, String, String, String)
         at System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
         at Cryze.API.Services.WyzeSdkService.DoLogin(PyModule scope, Object wyze_sdk_library) in /app/Services/WyzeSdkService.cs:line 113
         at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
         at Cryze.API.Services.WyzeSdkService.<>c__DisplayClass12_0.<GetSupportedCameras>b__0() in /app/Services/WyzeSdkService.cs:line 208
      --- End of stack trace from previous location ---
         at Cryze.API.Services.WyzeSdkService.GetSupportedCameras() in /app/Services/WyzeSdkService.cs:line 249
         at Cryze.API.Services.WyzeSdkService.UpdateCameraList() in /app/Services/WyzeSdkService.cs:line 260
         at Cryze.API.Store.CameraStoreActivities.LoadWyzeSupportedCamerasAsync() in /app/Store/CameraStoreActivites.cs:line 92
         at Cryze.API.Store.CameraStoreActivities.RunStartupActivitiesAsync() in /app/Store/CameraStoreActivites.cs:line 46
         --- End of inner exception stack trace ---
         at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
         at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
         at System.Threading.Tasks.Task.Wait()
         at Cryze.API.Startup.Configure(IApplicationBuilder app) in /app/Startup.cs:line 51
         at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
         at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
         at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
         at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
         at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
         at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
         at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
crit: Cryze.API.Python.PythonRuntimeTask[0]
      Shutting down python worker thread
crit: Cryze.API.Python.PythonRuntimeTask[0]
      Waiting for python worker thread to shutdown
crit: Cryze.API.Python.PythonRuntimeTask[0]
      Python thread cancelled
Cloud-121 commented 17 hours ago

Setting StoreConfiguration__LoadWyzeSupportedCamerasOnStartup to false allows the app to start but when the cameras are grabbed the same error is given within the web log.

PythonException: 400 Client Error: Bad Request for url: https://auth-prod.api.wyze.com/api/user/login

    Python.Runtime.PythonException.ThrowLastAsClrException()
    Python.Runtime.NewReference.StealOrThrow()
    Python.Runtime.PyObject.Invoke(PyTuple args, PyDict kw)
    Python.Runtime.PyObject.InvokeMethod(string name, PyTuple args, PyDict kw)
    Python.Runtime.PyObject.TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
    CallSite.Target(Closure , CallSite , object , string , string , string , string )
    Cryze.API.Services.WyzeSdkService.DoLogin(PyModule scope, object wyze_sdk_library) in WyzeSdkService.cs
    Cryze.API.Services.WyzeSdkService+<>c__DisplayClass12_0.<GetSupportedCameras>b__0() in WyzeSdkService.cs
    Cryze.API.Services.WyzeSdkService.GetSupportedCameras() in WyzeSdkService.cs
    Cryze.API.Services.WyzeSdkService.UpdateCameraList() in WyzeSdkService.cs
    Cryze.API.Controllers.CameraController.GetAllSupportedCameras() in CameraController.cs
    Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor+TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, object controller, object[] arguments)
    System.Threading.Tasks.ValueTask<TResult>.get_Result()
    Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask<IActionResult> actionResultValueTask)
    Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
    Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
    Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
    Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
    Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
    Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
    Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
    Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
    Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
    Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
    Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
    Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
    Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
xerootg commented 16 hours ago

so you can set false, then log in following the directions on the UI. There's four total environment variable values involved with logging in.

Cloud-121 commented 16 hours ago

I'm aware and I set all of them to what they should be, Are you saying start the containers with the only env being the false?

xerootg commented 15 hours ago

You should be able to set StoreConfiguration__LoadWyzeSupportedCamerasOnStartup=false, start only the api container, and then on the login page set the login variables and try loading the list of supported cameras. side note: I'm sorry for the mess, I was recovering from a surgery when I wrote this and my only goal was working cameras. Sanity was long gone ☠️

Cloud-121 commented 15 hours ago

You should be able to set StoreConfiguration__LoadWyzeSupportedCamerasOnStartup=false, start only the api container, and then on the login page set the login variables and try loading the list of supported cameras. side note: I'm sorry for the mess, I was recovering from a surgery when I wrote this and my only goal was working cameras. Sanity was long gone ☠️

Your completely fine ^^

Great work on it <3 Very nice of you to release the fork and not just keep it private:3

I hope you're recovering well

Cloud-121 commented 15 hours ago

so you can set false, then log in following the directions on the UI. There's four total environment variable values involved with logging in.

When I remove the User keys from the .env file and enter them inside the settings menu of the web interface, The cameras tab is able to pull the cameras but I'm unable to view the rtsp feed and a restart removes the login creds.

xerootg commented 7 hours ago

I'm doing much better now than I was, thanks for asking!

So config. Basically, the .env and the environment variables get read into IConfiguration and then pulled back out here: https://github.com/xerootg/cryze_v2/blob/main/cryze_api%2FModels%2FWyzeAPICredential.cs#L39-L42

Can you confirm you have all four? I know I had a typo at one point in the sample.env, but I think that should have been resolved.

Also, when you set the user/pass/key/secret, it gets written to a json file. If you set the 4, you should be able to retain the previously discussed value = false and just use the json for persistence.