self-host version, error message is displayed during use: GraphQLError: Cannot query field "copilot" on type "UserType"
What happened?
After the self-host version is deployed in the on-premises environment, check the exception log information and find the following error message:
Please, does it affect functionality? How should I fix it
Distribution version
Linux
What browsers are you seeing the problem on if you're using web version?
No response
Are you self-hosting?
- [ ] Yes
Relevant log output
No response
Anything else?
No response
the errors are reasoned by frontend did't follow server's Copilot feature. it won't affect any existing components.
When will you fix this? I really want to use Copilot on Selfhost version. It use to work a few months ago.
Update: I found the way. I edit wrong affine.js file. I need to edit /app/dist/config/affine.js to work.
@kunthawat Thank you this solution works. However, it's weird that we have to edit a file in the dist directory (which is presumably rebuilt every time we have to update the container) instead of using the path in the AFFINE_CONFIG_PATH variable like before. I also still don't understand why we can't just define the Open AI key using an environment variable like everything else...
It's also worth noting that the affine.js file has changed a bit with the newer version and it caused mine to be outdated, but it doesn't seem to be mentioned anywhere in the documentation.
@YummYume I'm lucky that I found a clue in discord. BTW the affine.js in old location used to work with old version. I think the team may fix this issue soon.