Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

New authentication system doesn't work

Open SleepingSmel opened this issue 7 months ago • 10 comments

I'm following up on the login issue with the new HuggingFace authentication system, which was reported approximately a month ago (see issue #4546). I respectfully ask the Flowise team to consider reverting to the previous authentication method, as this issue is significantly impacting production and has been ongoing for a month almost. Thank you.

https://github.com/FlowiseAI/Flowise/issues/4546

SleepingSmel avatar Jun 23 '25 12:06 SleepingSmel

can you share how you are running on HuggingFace? Step by step instructions

HenryHengZJ avatar Jun 23 '25 13:06 HenryHengZJ

Steps to reproduce the behavior:

  1. Create a Flowise server in Hugging Face following documentation using the same Dockerfile [ Link: HF Flowise doc ]. And including the following variables (but I tested with the minimum variables required, adding and removing, and it didn't work either):

Image

  1. Attempt to create an administrator account and log in
  2. See errors

Image

Errors in the browser were

Image

CHATFLOW 401 (Unauthorized)
{"error":"Unauthorized Access"}
rt {message: 'Request failed with status code 401', name: 'AxiosError', code: 'ERR_BAD_REQUEST', config: {…}, request: XMLHttpRequest, …}

Apprently, the error "ERR_BLOCKED_BY_CLIENT" doesn't allow to access the 'rw.js' file:

Image

After that, it is not able to receive authorization to log in:

Image

When clicking that link, a new window pops up with the error: {"error":"Unauthorized Access"}

SleepingSmel avatar Jun 24 '25 11:06 SleepingSmel

are you using the Dockerfile from the docs (https://docs.flowiseai.com/configuration/deployment/hugging-face#create-a-dockerfile) ? If not, can you copy paste your HF Dockerfile?

HenryHengZJ avatar Jun 24 '25 14:06 HenryHengZJ

are you using the Dockerfile from the docs (https://docs.flowiseai.com/configuration/deployment/hugging-face#create-a-dockerfile) ? If not, can you copy paste your HF Dockerfile?

I just tested with the exact Dockerfile from the docs, and it doesn't work. But mine either:

FROM node:18-alpine
USER root

# Arguments that can be passed at build time
ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise
ARG BASE_PATH=/root/.flowise
ARG DATABASE_PATH=$BASE_PATH
ARG SECRETKEY_PATH=$BASE_PATH
ARG LOG_PATH=$BASE_PATH/logs
ARG BLOB_STORAGE_PATH=$BASE_PATH/storage

# Install dependencies
RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium

ENV PUPPETEER_SKIP_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

# Install Flowise globally
RUN npm install -g flowise

# Configure Flowise directories using the ARG
RUN mkdir -p $LOG_PATH $FLOWISE_PATH/uploads && chmod -R 777 $LOG_PATH $FLOWISE_PATH

WORKDIR /data

CMD ["npx", "flowise", "start"]

SleepingSmel avatar Jun 24 '25 21:06 SleepingSmel

now you would need HF persistent disk, however I couldnt find a way to attach persistent diskt to Dockerfile, that's what causing it to logout as soon as you log in - https://discuss.huggingface.co/t/how-to-mount-persistent-disk-to-hf-spaces-in-docker/54161/2

other web hosting like Render Railway etc works fine

HenryHengZJ avatar Jun 25 '25 22:06 HenryHengZJ

now you would need HF persistent disk, however I couldnt find a way to attach persistent diskt to Dockerfile, that's what causing it to logout as soon as you log in - https://discuss.huggingface.co/t/how-to-mount-persistent-disk-to-hf-spaces-in-docker/54161/2

other web hosting like Render Railway etc works fine

Hi @HenryHengZJ , I appreciate your efforts. Does this imply that HF doesn't work across restarts even when paying for persistent disk? Because the CPU, RAM, and storage that HF provides are unmatched with any other service.

I have another question: Is it possible to maintain version 3.0.0 on the server indefinitely without needing to update or restart it? I understand that some functionalities may become deprecated over time, but this version is perfect for my project, which relies on maintaining the MySQL server on HF. Any guidance on how to host it indefinitely would be greatly appreciated, as the new authentication system has been a hurdle for the project.

Thanks.

SleepingSmel avatar Jun 26 '25 10:06 SleepingSmel

yep you can specify a specific version in the Dockerfile

npm install -g [email protected]

HF Spaces with Dockerfile is different, it doesnt really works as it is

HenryHengZJ avatar Jun 26 '25 13:06 HenryHengZJ

yep you can specify a specific version in the Dockerfile

npm install -g [email protected]

HF Spaces with Dockerfile is different, it doesnt really works as it is

Thank you for the quick response @HenryHengZJ . I understand that there isn’t a way to implement persistent storage in HF, which is disappointing. While I can use the code locally (npm install -g [email protected]), my question is whether I can maintain my current HF Flowise server on version 3.0.0 indefinitely for production use, or if it will become outdated as dependencies change over time. Thanks.

SleepingSmel avatar Jun 26 '25 14:06 SleepingSmel

If I try to use version 3.0.0 it just fails:

===== Application Startup at 2025-10-06 19:27:51 =====

2025-10-06 19:29:57 [ERROR]: unhandledRejection: File is not defined
ReferenceError: File is not defined
    at Object.<anonymous> (/usr/local/lib/node_modules/flowise/node_modules/cheerio/node_modules/undici/lib/web/webidl/index.js:531:48)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/flowise/node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js:12:20)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
ReferenceError: File is not defined
    at Object.<anonymous> (/usr/local/lib/node_modules/flowise/node_modules/cheerio/node_modules/undici/lib/web/webidl/index.js:531:48)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/flowise/node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js:12:20)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
2025-10-06 19:30:00 [ERROR]: unhandledRejection: File is not defined
ReferenceError: File is not defined
    at Object.<anonymous> (/usr/local/lib/node_modules/flowise/node_modules/cheerio/node_modules/undici/lib/web/webidl/index.js:531:48)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/flowise/node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js:12:20)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
ReferenceError: File is not defined
    at Object.<anonymous> (/usr/local/lib/node_modules/flowise/node_modules/cheerio/node_modules/undici/lib/web/webidl/index.js:531:48)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/flowise/node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js:12:20)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
```

Any clue why this would happen?

GameSetAndMatch avatar Oct 06 '25 19:10 GameSetAndMatch

I have he same issue, create a docker container with updated node20, other form doesn't build,

It build and run, i create user admin and password, then try t login but kick me out immediately

here my Dockerfile:

FROM node:20
--
 
# Use root user to install system dependencies (good practice for this section)
USER root
 
# Arguments that can be passed at build time
ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise
ARG BASE_PATH=/root/.flowise
ARG DATABASE_PATH=$BASE_PATH
ARG APIKEY_PATH=$BASE_PATH
ARG SECRETKEY_PATH=$BASE_PATH
ARG LOG_PATH=$BASE_PATH/logs
ARG BLOB_STORAGE_PATH=$BASE_PATH/storage
 
# Install dependencies using apt-get (Debian's package manager)
RUN apt-get update && \
apt-get install -y git python3 python3-pip make g++ build-essential libcairo-dev libpango1.0-dev chromium curl tar && \
rm -rf /var/lib/apt/lists/*
 
# Set environment variables for Puppeteer
ENV PUPPETEER_SKIP_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
 
# Install Flowise globally
RUN npm install -g flowise
 
# Configure Flowise directories using the ARG
RUN mkdir -p $LOG_PATH $FLOWISE_PATH/uploads && chmod -R 777 $LOG_PATH $FLOWISE_PATH
 
# Set working directory for the application
WORKDIR /data
 
# Run Flowise
CMD ["npx", "flowise", "start"]
 

<br class="Apple-interchange-newline">

lcardonag avatar Oct 19 '25 03:10 lcardonag