Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to connect to grocy #256

Closed
shootinggame82 opened this issue Dec 10, 2022 · 16 comments
Closed

Not possible to connect to grocy #256

shootinggame82 opened this issue Dec 10, 2022 · 16 comments

Comments

@shootinggame82
Copy link

It's not possible to connect to grocy,
The url to my grocy is correct, and tried different api keys.

I use the same username and password as for grocy.

The backend log says when trying to connect to grocy:

TypeError: Cannot read properties of undefined (reading 'get')

And in the browser i get the following errors:

Failed to load resource: the server responded with a status of 401 (Unauthorized)

There is no problem with my Grocy, the api is working, im using api for other applications.
There is some problems in your system.

@crazycat36
Copy link

I too am having the same problem

@inancdokurel
Copy link
Contributor

Had this issue, too. Fixed by clearing out the cookies for the site and creating a new username and password for recipe-buddy from /setup endpoint

@Saturo78
Copy link

I have the same problem.

@shootinggame82
Copy link
Author

Had this issue, too. Fixed by clearing out the cookies for the site and creating a new username and password for recipe-buddy from /setup endpoint

That is not possible, it's not possible to make another user.

@SKrywinski
Copy link

I have the same problem - can't create a new user from the frontend. But I can change the user accessing the mongodb; finding my way to get there (not very experienced with docker and docker-compose) I realized, that there are different networks interacting.
So I came across the idea that trying to access grocy, running on a raspberry in my local network from my notebook, recipe-buddy running in an docker-container on localhost could be a problem but I could dig into any deeper...
The error in my browser is 401 - incorrect grocy credentials (double- and triple-checked usernames, api-keys, ip-/addresses and so on), whereas docker-compose throws LOG [UsersService] TypeError: Cannot read properties of undefined (reading 'get') whenever I try to connect to grocy.

@creuzerm
Copy link

creuzerm commented Jan 6, 2023

I am having the same issue.
It appears like it could be a permissions thing talking to /api/users/ which is giving us the 401 Unauthorized as I am thinking the " @request() request: RequestWithUserInfo" isn't being sent along maybe?

React and typescript aren't familiar to me, so I am struggling figuring the actual issue out.

I did write the two Grocy settings values directly to the mongodb and I have a connection to grocy now. My Settings page loads my Grocy URL and API Key, but when I click update, I still get

PUT http://192.168.86.101:4000/api/users 401 (Unauthorized)
(anonymous) @ index.70f8cb40.js:45
uh @ index.70f8cb40.js:45
fh @ index.70f8cb40.js:45
request @ index.70f8cb40.js:45
(anonymous) @ index.70f8cb40.js:45
(anonymous) @ index.70f8cb40.js:44
b @ index.70f8cb40.js:163
b$ @ index.70f8cb40.js:84
w$ @ index.70f8cb40.js:84
S$ @ index.70f8cb40.js:84
vm @ index.70f8cb40.js:84
R0 @ index.70f8cb40.js:84
(anonymous) @ index.70f8cb40.js:84
yf @ index.70f8cb40.js:87
Qy @ index.70f8cb40.js:84
cu @ index.70f8cb40.js:84
Vp @ index.70f8cb40.js:84
B$ @ index.70f8cb40.js:84

[EDIT] Environment.... HomeAssistant installed in a Virtual Machine in Proxmox on an old HP ProLiant. Grocy is added to homeAssistant as an Addon. I do have an extra port mapped in the Grocy Addon settings so I can access Grocy directly rather than being forced to get routed through HomeAssistant. I tried three different ways/IPs/Paths of accessing Grocy. I have several other apps and tools successfully communicating with Grocy.

@goapunk
Copy link

goapunk commented Jan 15, 2023

Got the same with the official docker images, interestingly it works when running the dev version 🤷‍♂️ Adding a recipe will return a 500 but it still shows up in grocy

@the-despised
Copy link

I believe it is axios that is the problem.
in package.json i see
"axios" : "^1.2.0"
however in my local, when I install I see axios: "1.3.2" has actually arrived.

So.. my theory is that 1.3.2 is running in dev mode, where as 1.2.0 is running in the build.

Axios is the problem, error LOG [UsersService] TypeError: Cannot read properties of undefined (reading 'get') is 100% related to axios.

@ados8
Copy link

ados8 commented Apr 8, 2023

Was going to go with Mealie until I found this plugin for Grocy but it doesn't work. 😥
I have tired IP and domain, also with /api and /api/users.
My Grocy has an admin account with Buddy having the same admin username.
Is there a timeline to having this working, really want to use Grocy instead of Mealie.

@KyleStilkey
Copy link

KyleStilkey commented Apr 16, 2023

I am also having trouble getting this to connect with Home Assistance installation of Grocy. I am able to connect my barcode scanner and apps to my phone without trouble, I just can't get this to communicate at all with Home Assistance without getting this error.

I am going to guess the issue is that this is not running along side it. I have Home Assistant on my Pie and trying to connect to it from a device I have not logged into with, I will get a 404 page when I visit the base URL page and if I visit it when I am logged into Home Assistant I can see the Grocy page as normal.

I think if there was a Ad-On of this built into Home Assistant it will resolve a lot of problems as I believe there is extra steps needed to communicate with Home Assistant installations with the Grocy app.

@dotnjet
Copy link

dotnjet commented Apr 20, 2023

I too am having the same problem

@tynorton
Copy link

+1

1 similar comment
@davidbeijinho
Copy link

+1

@LeVraiRoiDHyrule
Copy link

Same problem here

@alkuzman
Copy link

+1

@georgegebbett
Copy link
Owner

Hi all, apologies for the delay in getting back to you all on this - I have just released V2 which takes the Grocy URL as an env var into the Docker container and has a vastly simplified setup process and architecture - please have a go with this and open a new issue if you have further problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests