Code Monkey home page Code Monkey logo

Comments (22)

EYHN avatar EYHN commented on August 17, 2024 3

@NeoHuncho @christianpedersen @HitchRait
Hey guys.

I helped a self-hoster solve a similar problem yesterday because he did not configure AFFINE_SERVER_HOST correctly. This variable defaults to localhost, and he is using ip to access his server. Please ensure that AFFINE_SERVER_HOST and AFFINE_SERVER_PORT are consistent with the url used for browser access.

https://docs.affine.pro/docs/self-host-affine/run-affine-with-custom-options

from affine.

christianpedersen avatar christianpedersen commented on August 17, 2024 1

Hi @EYHN!

That fixed it for me, thank you!

from affine.

StudyingLover avatar StudyingLover commented on August 17, 2024 1

works,thanks.

"Docker Compose will generate AFFiNE configuration files within the ~/.affine/self-host/config directory on the host system after the initial startup."

This statement should be emphasized in bold; initially, I thought it was written in the shell's environment variables.

from affine.

Arthur-Llevelys avatar Arthur-Llevelys commented on August 17, 2024 1

@attorneyatlaw I've written a tutorial for me, for installing AFFiNE on a VPS server, but I use apache not nginx.
link tutorial

with theses variables environment :

.../...
     AFFINE_SERVER_HOST=localhost
     AFFINE_SERVER_PORT=3010
     AFFINE_SERVER_HTTPS=false
.../...

from affine.

affine-issue-bot avatar affine-issue-bot commented on August 17, 2024

Issue Status: ✅ Answered

✅ Answered

The issue actually turned out to be a question or a misunderstanding, and it has been answered or resolved.

This is an automatic reply by the bot.

from affine.

forehalo avatar forehalo commented on August 17, 2024

did you get any suspicious logs from your container?

from affine.

christianpedersen avatar christianpedersen commented on August 17, 2024

I got the same issue with the latest version. Nothing in logs. In Chrome console the following error appears:

use-current-user.ts:70 {}
(anonymous) @ use-current-user.ts:70
Promise.then (async)
reload @ use-current-user.ts:69
(anonymous) @ sign-in-with-password.tsx:49
await in (anonymous) (async)
(anonymous) @ affine-async-hooks.ts:25
eI @ react-dom.production.min.js:54
eB @ react-dom.production.min.js:54
(anonymous) @ react-dom.production.min.js:55
t7 @ react-dom.production.min.js:55
re @ react-dom.production.min.js:106
(anonymous) @ react-dom.production.min.js:117
oP @ react-dom.production.min.js:274
eM @ react-dom.production.min.js:52
ru @ react-dom.production.min.js:109
nI @ react-dom.production.min.js:74
nO @ react-dom.production.min.js:73

from affine.

NeoHuncho avatar NeoHuncho commented on August 17, 2024

I have the same issue, the error is coming from this frontend hook:
use-current-user.ts:70

return mutate().then(e => {
       console.error(e);
     });
   },

The e object is empty.

from affine.

NeoHuncho avatar NeoHuncho commented on August 17, 2024

Hi @EYHN, thanks for the quick reply. Is this environment variable new? As I didn't have it in my docker-compose,but v0.12 was working fine without it.

from affine.

NeoHuncho avatar NeoHuncho commented on August 17, 2024

Worked for me too, thanks!

from affine.

EYHN avatar EYHN commented on August 17, 2024

Hi @EYHN, thanks for the quick reply. Is this environment variable new? As I didn't have it in my docker-compose,but v0.12 was working fine without it.

I honestly don't know why 0.12 works, but I'll add a reminder about this to the selfhost tutorial.

from affine.

HitchRait avatar HitchRait commented on August 17, 2024

Thanks, @EYHN ! It worked.

The last thing to mention: I have a VPN network and so my AFFiNE server has 2 IP's (local and VPN) and this solution doesn't work with another IP not mentioned in AFFINE_SERVER_HOST. Though it worked with my previous version (12).

I have a very specific use case, but hope to see it working regardless of IP address.

from affine.

attorneyatlaw avatar attorneyatlaw commented on August 17, 2024

Could you give me an example code(script, affine.js?) to fix this?
The below is correct? (my environment is ubuntu, arm64)

AFFINE_SERVER_HOST='https://affine.example.com'
AFFINE_SERVER_PORT=3010(right? I am now using affine behind nginx proxy manager)
AFFINE_SERVER_HTTPS=true;

I installed a stable version(self-host) but log-in just close the window and not log-in actually.
So my affine self host is not switched from local to cloud.

from affine.

EYHN avatar EYHN commented on August 17, 2024

Could you give me an example code(script, affine.js?) to fix this? The below is correct? (my environment is ubuntu, arm64)

AFFINE_SERVER_HOST='https://affine.example.com' AFFINE_SERVER_PORT=3010(right? I am now using affine behind nginx proxy manager) AFFINE_SERVER_HTTPS=true;

I installed a stable version(self-host) but log-in just close the window and not log-in actually. So my affine self host is not switched from local to cloud.

@attorneyatlaw The configuration here should be consistent with the URL you ultimately access with your browser. If the port number is 443 after you go through nginx, then AFFINE_SERVER_PORT should be 443

from affine.

attorneyatlaw avatar attorneyatlaw commented on August 17, 2024

not work for me.
log-in does not work.

from affine.

EYHN avatar EYHN commented on August 17, 2024

not work for me. log-in does not work.

@attorneyatlaw I noticed that your AFFINE_SERVER_HOST is wrong, it should not contain https://

If issue still exists, please tell me your configuration and what URL you use to access affine.

from affine.

Arthur-Llevelys avatar Arthur-Llevelys commented on August 17, 2024

same problem with selfhost, my configuration is :

.../...
     AFFINE_SERVER_HOST=affine.example.com
     AFFINE_SERVER_PORT=3010
     AFFINE_SERVER_HTTPS=true
.../...

image

from affine.

attorneyatlaw avatar attorneyatlaw commented on August 17, 2024

I tried without https:// and it worked. after log-in, mine is changed from local to AFFiNE Cloud.
I wrote down only the below in the yml file.

AFFINE_SERVER_HOST=affine.example.com

log-in worked but another problem happened.
The problem is that my affine is reset for the next time log-in.

Connection to my affine URL is directed to
https://af.example.com/onboarding (initialization setup display including 'AFFiNE is a workspace with fully merged docs,
whiteboards and databases' )

Initialization setup process happens again and again(when session is out, connected with other web browser).
Whenever I log-in, Demo Workspace is generated.

I used a stable image(ghcr.io/toeverything/affine-graphql:stable).

Untitled

from affine.

EYHN avatar EYHN commented on August 17, 2024

@attorneyatlaw When start on a new browser, affine will always create a new workspace (just a temporary workspace stored locally in the browser).

You can ignore it and click the workspace button from the upper sidebar to sign in to your account.

If you click Sign in and enable, it means logging in and upload this local workspace into cloud.

CleanShot 2024-03-26 at 21 48 53

If you are experiencing other issues, please provide a screen recording.

from affine.

attorneyatlaw avatar attorneyatlaw commented on August 17, 2024

You mean that whenever I connect my affine URL to sign-in, I should see the below and click to go to the next steps(clicking 3 next buttons, 1 Get Started button and 1 Got it! button), right?
(I use my web browser with the setting of clearing all data when the browser is closed.)

aUntitled

The above process is too burdensome.

I hope I can see the sign-up/sign display directly whenever I connect my affine URL.
I am curious that others use affine self host like this.

from affine.

EYHN avatar EYHN commented on August 17, 2024

@attorneyatlaw This onboarding animation has been removed from the web version. You can try updating to the latest version.

from affine.

attorneyatlaw avatar attorneyatlaw commented on August 17, 2024

@EYHN I tried the stable version again(2024. 03. 28. 09:53 AM UTC +9) and no onboarding animation is shown!
Thank for your help and effort.

from affine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.