Pixelfed: How to manipulate some settings and database entries

My YunoHost server

Hardware: Raspberry Pi at home
YunoHost version: 4.3.6.2
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

Hi,

my apps are lying in the domain yunohost.local
Now I created a new domain pixelfed.local and in addition installed Pixelfed.
To my surprise this is working generally :grinning:

I had to turn off email verification in the .env-file to be able to login because I always get an error with the link provided in the verification email.

Now I would simply like to set a date into the database table “users” in the field “email_verified_at” to get rid of the message “email not verified”. I’m not used to work with postgre databases, but I maybe got close to solution:
With ssh I went into the folder /usr/lib/postgresql/11/bin/ and entered the command

psql -d pixelfed -U pixelfed -W

then I enter the password that I found in the .env-file

Seems like I’m into the Postgre-command interface. When I enter \dt I can see all tables of the pixelfed database.
Before altering some values I first try to do a select:

SELECT * FROM users

But nothing happens…

Second problem is that I can’t use PixelDroid. As I read a call to my /api/v1/instance should deliver mobile_api: true
But I don’t find mobile_api in there. Not “false” and not “true” - it’s missing. In .env OAUTH_ENABLED is set to true. And in the Pixelfed-Admin-Panel under “Settings” “APIs enabled” is checked

Is there another way to make this work?

Best regards

The first problem is gone:
There was a “;” missing.
Now I entered

UPDATE users SET email_verified_at = '2022-02-13 08:00:00' WHERE id = 1;

and my email is verified :grinning:

But I still have no idea how to solve the mobile_api problem

It’s working on my instance, without any special change. So it should be something available by default on all of them :thinking:

What Pixelfed version are you using ?

1 Like

Thank you very much. I’m using v0.11.2.

When I start PixelDroid I have to enter my domain. After tapping on the “connect” button my browser opens. Then I have to enter my credentials. A page opens where I can authorize PixelDroid with read write and follow permissions.
After tapping on “Authorize” the app PixelDroid is loading and is jumping to the first page where I have to enter my domain where my previous input is cleared.

In my Pixelfed under “Settings → Applications” I can see a new “Authorized” application “PixelDroid”. If I repeat previous steps, this list is getting longer.

Maybe my database is not working properly. When I go to “My Feed” while logged in, then I can see all my posts in the correct order.
But when I select “Public Feed” then some posts disappear. All of them are set public.
I found out that all missing posts have negative id’s in the database.
When I set one of these id’s into a positive value then the post is appearing in “Public Feed”, but still not in correct order…

Thanks for your explanations. I wonder if that should be reported to PixelDroid/Pixelfed authours, because it may look like a Pixelfed bug… but I’m unsure, and I don’t know how Pixelfed API work so I can’t really investigate this :frowning:

1 Like

Thank you very much.
Some testings later e.g. with the app Fedilab I found out that there are some entries inm the nginx logfiles.
Seems like both apps are trying to call files like

  • /var/www/pixelfed/public/ynh_portal.js
  • /var/www/pixelfed/public/ynh_overlay.css
  • /var/www/pixelfed/public/ynhtheme/custom_portal.js
  • /var/www/pixelfed/public/ynhtheme/custom_overlay.css

My installation does not have these files. Are they missing or are they optional?

Pixeldroid seems to fail verifying the credentials. Is the redirect address that is set automatically correct (redirect_uri=oauth2redirect://org.pixeldroid.app) ?

192.168.2.149 - - [17/Feb/2022:06:58:16 +0100] "GET /.well-known/nodeinfo HTTP/2.0" 200 123 "-" "okhttp/4.9.1"
192.168.2.149 - - [17/Feb/2022:06:58:17 +0100] "POST /api/v1/apps HTTP/2.0" 200 190 "-" "okhttp/4.9.1"
192.168.2.149 - - [17/Feb/2022:06:58:17 +0100] "GET /api/nodeinfo/2.0.json HTTP/2.0" 200 1434 "-" "okhttp/4.9.1"
192.168.2.149 - - [17/Feb/2022:06:58:20 +0100] "GET /oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow HTTP/2.0" 200 5751 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:20 +0100] "GET /ynh_portal.js HTTP/2.0" 404 836 "https://pixelfed.local/oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:20 +0100] "GET /ynh_overlay.css HTTP/2.0" 404 836 "https://pixelfed.local/oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:20 +0100] "GET /ynhtheme/custom_portal.js HTTP/2.0" 404 836 "https://pixelfed.local/oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:20 +0100] "GET /ynhtheme/custom_overlay.css HTTP/2.0" 404 836 "https://pixelfed.local/oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:20 +0100] "GET /css/app.css?id=70554ace925b5a7ecef2 HTTP/2.0" 200 491602 "https://pixelfed.local/oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:20 +0100] "GET /img/pixelfed-icon-grey.svg HTTP/2.0" 200 1092 "https://pixelfed.local/oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:21 +0100] "GET /img/icon/alert-circle.svg HTTP/2.0" 200 379 "https://pixelfed.local/oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:21 +0100] "GET /img/icon/unlock.svg HTTP/2.0" 200 679 "https://pixelfed.local/oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:21 +0100] "GET /ynh_overlay.css HTTP/2.0" 404 836 "https://pixelfed.local/oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:21 +0100] "GET /ynhtheme/custom_portal.js HTTP/2.0" 404 836 "https://pixelfed.local/oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:21 +0100] "GET /ynhtheme/custom_overlay.css HTTP/2.0" 404 836 "https://pixelfed.local/oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:21 +0100] "GET /favicon.ico HTTP/2.0" 200 0 "https://pixelfed.local/oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:23 +0100] "POST /oauth/authorize HTTP/2.0" 302 0 "https://pixelfed.local/oauth/authorize?client_id=22&redirect_uri=oauth2redirect://org.pixeldroid.app&response_type=code&scope=read%20write%20follow" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.0.0 Mobile Safari/537.36"
192.168.2.149 - - [17/Feb/2022:06:58:24 +0100] "POST /oauth/token HTTP/2.0" 200 1847 "-" "okhttp/4.9.1"
192.168.2.149 - - [17/Feb/2022:06:58:25 +0100] "GET /api/v1/accounts/verify_credentials HTTP/2.0" 500 12106 "-" "okhttp/4.9.1"

Sounds like there is a redirection to the SSO :thinking: (I suppose it’s Yunohost login page CSS/JS)

Is the API page publicly available ? (can you connect to it using private browsing, not being logged in ?)
That might be the issue.

1 Like

Thank you very much for your help!
Can Pixelfed being used on a Raspberry Pi? I opened an issue on the Pixelfed site because of my random id numbers that sometimes get negative.
The reason for this seems to be that Pixelfed is using “snowflake” to generate the status id. I got the information that 64bit php is needed for this.
I’m not sure, but I don’t believe that my Raspberry Pi can do that?
So I’m looking for a solution to get “snowflake” switched off in my personal Pixelfed.
PixelDroid is not so important. Maybe the Oauth-values are also generated with 64bit php so they fail on my instance?
I can use Fedilab - the only problem are negative IDs of statuses. When I have one, Fedilab deliveres an error… :smiley:

I don’t know if ARM architecture are well supported, but in terms of performances, it should be running fine (for a small instance).

I don’t really know how that works on Raspberry Pi, I know the official distribution is available in 64 bits only very recently, but I suppose 64 bits program were already running… well I’m not sure :sweat_smile:

It might be interesting to report the issue you encounters to Pixelfed github repository… I hope they will have more information.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.