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

Always Get Incorrect Credentials #54

Open
snibbo71 opened this issue Feb 26, 2020 · 54 comments
Open

Always Get Incorrect Credentials #54

snibbo71 opened this issue Feb 26, 2020 · 54 comments

Comments

@snibbo71
Copy link

Trying to login for the first time. I've put a credentials.conf in the /data/fdroid directory with the correct credentials. The Docker log shows LoginError: Server Says 'Unknown_ERR'

Trying to login through the login screen always gives Incorrect Credentials and the same error in the Docker log

I've switched Less Secure Apps to be allowed on my Google Account but still no joy. The username and password are definitely correct.

Am I doing something wrong or is this app now broken?

Ta!

@Jonny007-MKD
Copy link

Hi @snibbo71,
I am using App Passwords as my original password was too long. Some error with key derivation etc. Perhaps you have the same issue?

@oova
Copy link

oova commented Apr 7, 2020

Hi,
I'm facing the same problem as @snibbo71 . Any insights yet?

I cannot use App Passwords as it requires 2FA and I do not want to give Google my phone number.

I'd appreciate any support. Thanks.

@Jonny007-MKD
Copy link

Is there any more info in the log that you could post?

@oova
Copy link

oova commented Apr 8, 2020

This is what I see in my docker logs:

Repo already initalized, skipping init
Checking config.py file
Skipping fdroid update
WARNING:tornado.access:404 GET /favicon.ico (217.254.xx.yy) 1.04ms
SecurityCheckError:
WARNING:tornado.access:404 GET /favicon.ico (217.254.xx.yy) 1.05ms
SecurityCheckError:
SecurityCheckError:
WARNING:tornado.access:404 GET /favicon.ico (217.254.xx.yy) 1.06ms
LoginError: 'server says: UNKNOWN_ERR'
LoginError: 'server says: UNKNOWN_ERR'
LoginError: 'server says: UNKNOWN_ERR'
LoginError: 'server says: UNKNOWN_ERR'
LoginError: 'server says: UNKNOWN_ERR'
LoginError: 'server says: UNKNOWN_ERR'
LoginError: 'server says: UNKNOWN_ERR'
WARNING:tornado.access:404 GET /favicon.ico (217.254.xx.yy) 1.04ms
LoginError: 'server says: UNKNOWN_ERR'
LoginError: 'server says: UNKNOWN_ERR'

Note that the security errors are most likely due to my restrictive web server config. I don't think they have anything to do with the authentication error.

Is there a debug logging I could enable to get more detailed messages?

Thanks for looking into this.

@Jonny007-MKD
Copy link

The SecurityCheckError is an exception thrown during login (see service.py and https://github.com/NoMore201/googleplay-api/blob/master/gpapi/googleplay.py#L235). In the current version of googleplay-api the exception text says you shall visit https://accounts.google.com/b/0/DisplayUnlockCaptcha. I don't know how this exactly works but perhaps it helps :)

@oova
Copy link

oova commented Apr 13, 2020

Thanks for pointing me to the unlock captcha page. I tried it and it did not help, unfortunately. Same error message.

@Jonny007-MKD
Copy link

Did you check that you have the most recent versions?

@oova
Copy link

oova commented Apr 13, 2020

I'm using the latest docker image from https://github.com/NoMore201/playmaker. This might be out of date, though.

@Jonny007-MKD
Copy link

Yes, unfortunately it is. Can you please either use https://hub.docker.com/r/fellek/playmaker (creator of the PR) or build it yourself (it's as easy as checking it out and calling docker build with some arguments).

@oova
Copy link

oova commented May 2, 2020

Sorry for my late reply. Using fellek's docker image fixed the issue for me. Thanks for pointing me to it!

@Jonny007-MKD
Copy link

Great :) You're welcome!

@ElucGeek
Copy link

ElucGeek commented May 28, 2020

Hello, I'm not opening a new issue as this one is still open, I have the same problem, I never succeed to get pass the credentials. I tried with my main password, with an app password, from the web interface, each time I got a wrong credentials. I tried to create the file credentials.conf with the app password in it as instructed. I'm just not sure where to place it. I mounted my docker volume as /docker/Playmaker to /data, at least it can get the certificate from here, so it should work. I also tried to place the conf file in a fdroid subfolder so within docker it should be seen as /data/fdroid/credentials.conf . But still nothing work, I got the login page at after restarting the container. I used the Fellek Docker container, version is v0.6.4.
What can I try next?

@mlmss
Copy link

mlmss commented Jun 1, 2020

I also have the issue with wrong credentials. However, it just ocured recently, everything worked as expected before. I used the latest noMore201 docker image and also tried the Fellek image. But no luck, always the wrong credentials error. The error in the log is 'server says: BadAuthentication'. I've no idea what to do next.

@Findus23
Copy link

Findus23 commented Jun 2, 2020

I also had the same issue that login didn't work at all, so I checked out the branch from #53 updated googleplay-api to 0.4.4 and it mostly works again. I can log in, manually download apps, but I am not sure if the update check is working.
(Just FYI, I am not using docker, but running it directly on my server in a virtualenv)

@mlmss
Copy link

mlmss commented Jun 2, 2020

Thanks, but how do I do that? I'm using docker and just build the fellek image again but no luck. Still "BadAuthentication". In my understandig if I build the docker image with "docker build https://github.com/fellek/playmaker.git --tag=playmaker:fellek" it should include the updated googleplay-api. Am I wrong?

@Jonny007-MKD
Copy link

Hi @mlmss, can you please paste the output of docker logs when you try to login? I have rebuilt my own fork (which contains the same fixes as fellek but a different Dockerfile) and I could login with an App pasword.

@mlmss
Copy link

mlmss commented Jun 4, 2020

Hi @Jonny007-MKD here is the output of the playmaker logs:

`Checking config.py file

Appending playmaker data to config.py

Skipping fdroid update

WARNING:tornado.access:404 GET /favicon.ico (172.17.0.1) 1.94ms

LoginError: 'server says: BadAuthentication'`

@garrettboone
Copy link

I'm following along and working on the same thing.

My logs are:
Checking config.py file
Appending playmaker data to config.py
Skipping fdroid update
LoginError: 'server says: BadAuthentication'

I had the same tornado warning but only when downloading the docker image instead of building it.

@mikken
Copy link

mikken commented Jun 14, 2020

I also tried both nomore201/playmaker and fellek/playmaker:fellek from Dockerhub and both can't auth:
LoginError: 'server says: BadAuthentication'

@mikken
Copy link

mikken commented Jun 14, 2020

There's a recent issue here as well:
NoMore201/googleplay-api#125

@mlmss
Copy link

mlmss commented Jun 14, 2020

Meanwhile I did a lot of testing and I have at least a bit of success.
As there are 29 forks I tried some of them and figured out that the build from crazled allows me to login again.
However, it is impossible to search and add any app to my fdroid repo. I think the issue is related to PR #53.
So I replaced the playmaker folder from crazled with the one from fellek. As result I'm able to login, search and add apps to my fdroid repo.
But still there is another issue: fdroid repo update doesn't work. In the docker logs there is the following error:

error updating fdroid repository CRITICAL: Unknown exception found!, Traceback (most recent call last):, File "/usr/bin/fdroid", line 170, in <module>, main(), File "/usr/bin/fdroid", line 165, in main, raise e, File "/usr/bin/fdroid", line 146, in main, mod.main(), File "/usr/lib/python3/dist-packages/fdroidserver/update.py", line 1968, in main, apks, cachechanged = process_apks(apkcache, repodirs[0], knownapks, options.use_date_from_apk), File "/usr/lib/python3/dist-packages/fdroidserver/update.py", line 1496, in process_apks, use_date_from_apk, ada, True), File "/usr/lib/python3/dist-packages/fdroidserver/update.py", line 1410, in process_apk, if not common.verify_apk_signature(apkfile):, File "/usr/lib/python3/dist-packages/fdroidserver/common.py", line 2867, in verify_apk_signature, output = subprocess.check_output(args + [apk]), File "/usr/lib/python3.7/subprocess.py", line 395, in check_output **kwargs).stdout, File "/usr/lib/python3.7/subprocess.py", line 472, in run, with Popen(*popenargs, **kwargs) as process:, File "/usr/lib/python3.7/subprocess.py", line 775, in __init__, restore_signals, start_new_session), File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child, raise child_exception_type(errno_num, err_msg, err_filename), OSError: [Errno 8] Exec format error: '/usr/bin/apksigner',

At the moment I don't know how to solve this issue.
I'm pretty sure that replacing the folder is not the right way but I'm not an expert on this.
Would be grateful for any hints.

@garrettboone
Copy link

I had also seen this NoMore201/googleplay-api#84 (comment) suggesting python3.7.7. I'm running Ubuntu 18.04 and the repo is showing up to 3.7.5 so pushing past that was another route I was considering.

@mlmss
Copy link

mlmss commented Jun 14, 2020

But how do I do that? In felleks image it is 3.7.2 and in crazled it is 3.8.3. Where do I get 3.7.7 and how do I get it into the image?

@garrettboone
Copy link

garrettboone commented Jun 14, 2020

@mlmss The script from crazled appears to pull it. Or did in the past.

Maybe here: https://github.com/docker-library/python/tree/43e801fc6ced5379e70a058a3d4fa3c2ee8c8976

@mlmss
Copy link

mlmss commented Jun 14, 2020

It is pulling python 3-buster which is currently 3.8.3. However I figured out how to change felleks dockerfile to pull 3.7.7-stretch. Unfortunately no luck - still "wrong credentials" and "Bad Authentication" in the log. So 3.7.7 is not the solution I'm afraid.

@mlmss
Copy link

mlmss commented Jun 14, 2020

I'm just trying to use 3.8-rc-stretch with fellek. This is the latest version I could find for stretch.
Here: https://hub.docker.com/_/python?tab=tags&page=5&name=stretch&ordering=-name

No luck. Container crashes with many errors.

@Findus23
Copy link

Findus23 commented Jun 14, 2020

For reference as I seem to be the only person for whom it works:

I am using Debian Stable with Python 3.7.3
I am using poetry to manage the dependencies with the following

[tool.poetry.dependencies]
python = "^3.7"
tornado = "<5"
gpapi = "0.4.4"
tornado-crontab = "^0.4.0"
pycryptodome = "^3.9.6"
pyaxmlparser = "^0.3.24"
sentry_sdk = "^0.14.1"
fdroidserver = "^1.1.6"

which means I also use the latest fdroidserver by the fdroid team.

This is the output of a pip freeze

(playmaker) ➜  ~ pip freeze  
androguard==3.3.5
apache-libcloud==3.0.0
args==0.1.0
asn1crypto==1.3.0
bcrypt==3.1.7
certifi==2020.4.5.1
cffi==1.14.0
chardet==3.0.4
click==7.1.2
clint==0.5.1
colorama==0.4.3
crontab==0.22.8
cryptography==2.9.2
cycler==0.10.0
decorator==4.4.2
defusedxml==0.6.0
docker-py==1.10.6
docker-pycreds==0.4.0
fdroidserver==1.1.7
future==0.18.2
gitdb==4.0.5
GitPython==3.1.3
gpapi==0.4.4
idna==2.9
ipython==5.9.0
ipython-genutils==0.2.0
kiwisolver==1.2.0
lxml==4.5.1
matplotlib==3.2.1
mwclient==0.10.1
networkx==2.4
numpy==1.18.4
oauthlib==3.1.0
paramiko==2.7.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==7.1.2
prompt-toolkit==1.0.18
protobuf==3.12.2
ptyprocess==0.6.0
pyasn1==0.4.8
pyasn1-modules==0.2.1
pyaxmlparser==0.3.24
pycparser==2.20
pycryptodome==3.9.7
pydot==1.4.1
Pygments==2.6.1
PyNaCl==1.4.0
pyparsing==2.4.7
python-dateutil==2.8.1
python-vagrant==0.5.15
PyYAML==5.3.1
qrcode==6.1
requests==2.23.0
requests-oauthlib==1.3.0
ruamel.yaml==0.16.10
ruamel.yaml.clib==0.2.0
sentry-sdk==0.14.4
simplegeneric==0.8.1
six==1.15.0
smmap==3.0.4
tornado==4.5.3
tornado-crontab==0.4.0
traitlets==4.3.3
urllib3==1.25.9
wcwidth==0.1.9
websocket-client==0.57.0

I am using 559f770 of the code which at the moment is the latest version of the #53 branch by @fellek

@mlmss
Copy link

mlmss commented Jun 14, 2020

@Findus23: Thanks a lot, but I've no idea how to follow that path.
Debian stable is buster at the moment but @fellek Dockerfile is based on stretch.
So could you post your Dockerfile?
If I clone felleks repo do I get the #53 branch (I thought so)?
And could you give me a hint how to use poetry?

@Jonny007-MKD
Copy link

It works for me with my fork, too. I'm going to have a loo at crazeld's fork.
I had the same apksigner error and replaced it by a bash script in my container: https://github.com/Jonny007-MKD/playmaker/blob/master/apksigner

@mikken
Copy link

mikken commented Jun 14, 2020

@Jonny007-MKD your fork works for me, too.
But looks like it doesn't support APK bundles (always downloads pure APK). Looking at googleapi repo, they should already support APK bundles.
About other forks, I don't know if they support APK bundles, this was my reason for update and here I was stuck with login problem again.

@Findus23
Copy link

@mlmss

I don't use docker, I simply install playmaker directly on my host in a python virtualenv. While I use poetry to manage the dependencies, using pip should also work the same.

If I clone felleks repo do I get the #53 branch (I thought so)?

Yes, as the PR is on their master branch.

@mlmss
Copy link

mlmss commented Jun 15, 2020

Finally, after some more testing that I'm close to a fully functional playmaker again.
The most important hint came from @Jonny007-MKD about the script for the apksigner.
So in the result I cloned the repo from @Jonny007-MKD but replaced the /playmaker/playmaker folder with the one from @fellek. Moreover I changed two things in the Dockerfile: python from stretch to buster and openjdk from 8 to 11. Finally in the container I replaced the apksigner symlink with the script from @Jonny007-MKD.
With that I can login again, search and add apps and update the fdroid repo.
However, with the last point there is still an issue. With a couple of apps everything was fine but now I get the fdroidservertool update error again. Here is the log:

CRITICAL: Unknown exception found!

Traceback (most recent call last):
  File "/usr/bin/fdroid", line 170, in <module>
    main()
  File "/usr/bin/fdroid", line 165, in main
    raise e
  File "/usr/bin/fdroid", line 146, in main
    mod.main()
  File "/usr/lib/python3/dist-packages/fdroidserver/update.py", line 1968, in main
    apks, cachechanged = process_apks(apkcache, repodirs[0], knownapks, options.use_date_from_apk)
  File "/usr/lib/python3/dist-packages/fdroidserver/update.py", line 1496, in process_apks
    use_date_from_apk, ada, True)
  File "/usr/lib/python3/dist-packages/fdroidserver/update.py", line 1369, in process_apk
    apk = scan_apk(apkfile)
  File "/usr/lib/python3/dist-packages/fdroidserver/update.py", line 1055, in scan_apk
    scan_apk_androguard(apk, apk_file)
  File "/usr/lib/python3/dist-packages/fdroidserver/update.py", line 1292, in scan_apk_androguard
    name = str(item.attrib[xmlns + 'name'])
  File "src/lxml/etree.pyx", line 2466, in lxml.etree._Attrib.__getitem__

KeyError: '{http://schemas.android.com/apk/res/android}name'

I don't know what that key error means or is it something else?

@Findus23
Copy link

@mlmss are you using the latest version of fdroidserver? (1.1.7)

@Jonny007-MKD
Copy link

@MLNSS: Interesting you had to upgrade to buster and jdk11, I am using that since December.
As we are using fdroidserver from debian buster it is still version 1.1.4

@garrettboone
Copy link

garrettboone commented Jun 15, 2020

Probably not worth anything but I managed to get everything to install without errors. libncurse5 was not available in apt so I went with 6. openjdk-11 threw errors when installing the sdk-tools so I looked up the alternative command-line-tools info. So, this Dockerfile that uses the new command-line tools:

FROM python:3-buster

RUN apt-get update &&
apt-get install -y git
lib32stdc++6
lib32gcc1
lib32z1
# libncurses5
lib32ncurses6
libffi-dev
libssl-dev
libjpeg-dev
libxml2-dev
libxslt1-dev
openjdk-11-jdk-headless
virtualenv
wget
unzip
fdroidserver
zlib1g-dev
less
nano

#RUN wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
# && echo "92ffee5a1d98d856634e8b71132e8a95d96c83a63fde1099be3d86df3106def9 sdk-tools-linux
-4333796.zip" | sha256sum -c
# && unzip sdk-tools-linux-4333796.zip
# && rm sdk-tools-linux-4333796.zip
RUN wget https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip
&& echo "F10F9D5BCA53CC27E2D210BE2CBC7C0F1EE906AD9B868748D74D62E10F2C8275 commandlinetools
-linux-6200805_latest.zip" | sha256sum -c
&& unzip commandlinetools-linux-6200805_latest.zip
&& rm commandlinetools-linux-6200805_latest.zip

RUN mkdir /opt/android-sdk-linux
&& mv tools /opt/android-sdk-linux/tools

ENV ANDROID_HOME=/opt/android-sdk-linux
ENV PATH=$PATH:$ANDROID_HOME/tools
#RUN echo 'y' | tools/bin/sdkmanager --sdk_root=/opt/android-sdk-linux --verbose --install "pl
atforms;android-28" "build-tools;28.0.3"
#RUN echo 'y' | tools/bin/sdkmanager --sdk_root=/opt/android-sdk-linux --verbose "build-tools;
29.0.2"
RUN echo 'y' | /opt/android-sdk-linux/tools/bin/sdkmanager --sdk_root=/opt/android-sdk-linux -
-verbose --install "platforms;android-28"

RUN echo 'y' | rm -rf tools

RUN mkdir -p /data/fdroid/repo &&
mkdir -p /opt/playmaker
COPY README.md setup.py pm-server /opt/playmaker/
ADD playmaker /opt/playmaker/playmaker
RUN rm -rf /usr/bin/apksigner
COPY apksigner /usr/bin/apksigner
RUN chmod +x /usr/bin/apksigner

WORKDIR /opt/playmaker
RUN pip3 install --upgrade pip
RUN pip3 install . &&
cd /opt && rm -rf playmaker &&
sed -i 's/"sdk_version"/#"sdk_version"/g' /usr/local/lib/python3.8/site-packages/gpapi
/config.py

RUN groupadd -g 999 pmuser &&
useradd -m -u 999 -g pmuser pmuser
RUN chown -R pmuser:pmuser /data/fdroid &&
chown -R pmuser:pmuser /opt/playmaker
USER pmuser

VOLUME /data/fdroid
WORKDIR /data/fdroid

EXPOSE 5000
ENTRYPOINT python3 -u /usr/local/bin/pm-server --fdroid --debug


But of course it doesn't load at all in the browser. No errors in docker logs. How can I see what's going on under the hood? I'm not familiar with most of the python packages.

I broke something, but cannot see what.

EDIT: Correction - I had Nginx configured wrong. It works fine now.

@mlmss
Copy link

mlmss commented Jun 15, 2020

Ok, some more testing. As @Jonny007-MKD said already it was 1.1.4 for fdroidserver.
What I did now was I removed the fdroidserver package installation from the Dockerfile (so no buster anymore) and added a new line before the RUN groupadd line:

RUN pip install fdroidserver

Now it is 1.1.7 and viola no errors anymore and the fdroid repo updates as expected.
So finally my playmaker is up and running again.

Thanks a lot to everybody for all the help.

@Jonny007-MKD
Copy link

@mlmss: great! I'll change my Dockerfile to use pip, too :) thanks!

@mlmss
Copy link

mlmss commented Jun 16, 2020

I'm sorry, perhaps I was a bit to optimistic. It turned out that there are some more issues.

After downloading several apps yesterday and today I now get always an error message:
Here is just an example, I tried several apps:

org.jitsi.meet can't be downloaded

In the log there is a message:

Failed to download org.jitsi.meet,
'App not purchased'

All the apps I tried are definitely free of charge, so the error doesn't make sense.

The second issue is related to the app description in the repo. It is always

Unknown application

I found out that all the files in the metadata folder end with .yml whereas in my old backup folder the files end with .txt.
I tried as workaround to simply rename the files from .yml to .txt but that doesn't work.
The error in the log says:

error updating fdroid repository CRITICAL: Unrecognised app field: AuthorName

I probably could remove the "AuthorName" line from each file but there should be a proper solution to that.
However, I don't have a clou where that comes from.

@fellek
Copy link

fellek commented Jun 16, 2020

Hi, thanks for pushing this issue forwards!
Sadly I have no time to work on this issue.

org.jitsi.meet can't be downloaded

In the log there is a message:

Failed to download org.jitsi.meet,
'App not purchased'

All the apps I tried are definitely free of charge, so the error doesn't make sense.

In this case you have to go first in Google App Store and press button for given App to make download through your server possible... Weird but working for me.

error updating fdroid repository CRITICAL: Unrecognised app field: AuthorName

It sounds like #PR53. I had to change some Python files because of casesensitiv fieldnames. If you just switched to #PR53 and you have some old cached files I suggest, there is some incompatibility. It could help to remove all cached files... But of course there will be some work to regain your desired apps.. If someone finds a way to do this in automated way please give a hint!
Otherwise, it could be necessary to change updatescript in Python.

@mlmss
Copy link

mlmss commented Jun 16, 2020

@fellek Thanks for the hint, but I've build the whole repo from scratch already. I don't understand, why there are yml files now whereas there were txt files previously.
Where do I find the update script?

@fellek
Copy link

fellek commented Jun 16, 2020

@mlmss thnks for your answer. In this case I have no idea. (updatescript is locatet at playmaker/service.py, but I really don't know which code is responsible for .txt files in cache!)
There are lot of changes in the packages I could not install by myself until now. Hope you will find some answers!

@mlmss
Copy link

mlmss commented Jun 17, 2020

@fellek Thanks a lot. With regard to the failed downloads, your hint did the trick. I ignore txt files problem at the moment as it is not important. Just for my understanding: the fdroid updater script should convert the yml files to txt right?

@fellek
Copy link

fellek commented Jun 17, 2020

@mlmss good to know that this hint is still working. All about fdroid updater I have no knowlegde.. Sorry!

@mlmss
Copy link

mlmss commented Jun 17, 2020

@fellek Ok, no problem. But I have two other questions because the problem with fdroidserverupdatetool is back. It seems that it is related to the apksigner and the sdk level. In this respect what should this line in your dockerfile do?

 sed -i 's/\"sdk_version\"/#\"sdk_version\"/g' /usr/local/lib/python3.7/site-packages/gpapi/config.py

If I put it in my dockerfile I have an error. Could I do it afterwards in the container?

@Jonny007-MKD
Copy link

@mlmss This command replaces

  • "sdk_version" with
  • #"sdk_version"

Probably that means it's adding a comment char

@mlmss
Copy link

mlmss commented Jun 21, 2020

@Jonny007-MKD Thanks for the hint. I figured out that this line isn't necessary anymore. It is related to this issue but seems to be resolved in the latest gpapi.

Meanwhile it turned out the the newly occured errors in the fdroid repo update were caused by the Android Webview apk. At the moment where I downloaded that app in my repo I got errors during fdroid repo update:

Downloading com.google.android.webview
Adding com.google.android.webview into cache..
error updating fdroid repository INFO: Starting analysis on AndroidManifest.xml
INFO: APK file was successfully validated!
WARNING: Requested API level 30 is larger than maximum we have, returning API level 28 instead.
WARNING: RES_TABLE_LIBRARY_TYPE chunk is not supported
CRITICAL: Unknown exception found!
Traceback (most recent call last):
  File "/usr/local/bin/fdroid", line 170, in <module>
    main()
  File "/usr/local/bin/fdroid", line 165, in main
    raise e
  File "/usr/local/bin/fdroid", line 146, in main
    mod.main()
  File "/usr/local/lib/python3.8/site-packages/fdroidserver/update.py", line 1968, in main
    apks, cachechanged = process_apks(apkcache, repodirs[0], knownapks, options.use_date_from_apk)
  File "/usr/local/lib/python3.8/site-packages/fdroidserver/update.py", line 1495, in process_apks
    (skip, apk, cachethis) = process_apk(apkcache, apkfilename, repodir, knownapks,
  File "/usr/local/lib/python3.8/site-packages/fdroidserver/update.py", line 1369, in process_apk
    apk = scan_apk(apkfile)
  File "/usr/local/lib/python3.8/site-packages/fdroidserver/update.py", line 1055, in scan_apk
    scan_apk_androguard(apk, apk_file)
  File "/usr/local/lib/python3.8/site-packages/fdroidserver/update.py", line 1276, in scan_apk_androguard
    icon_id = int(icon_id_str.replace("@", "0x"), 16)
ValueError: invalid literal for int() with base 16: '<0x70086, type 0x07>'

So apart from the missing description in the metadata everything is working as expected now.

@mlmss
Copy link

mlmss commented Jun 21, 2020

Just for the sake of completeness and perhaps it will help others here is my Dockerfile:

FROM python:3-buster

RUN apt-get update && \
    apt-get install -y git \
    lib32stdc++6 \
    lib32gcc1 \
    lib32z1 \
    lib32ncurses6 \
    libffi-dev \
    libssl-dev \
    libjpeg-dev \
    libxml2-dev \
    libxslt1-dev \
    openjdk-11-jdk-headless \
    virtualenv \
    wget \
    unzip \
    zlib1g-dev \
    less \
    mc \
    nano

RUN wget https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip \
    && echo "F10F9D5BCA53CC27E2D210BE2CBC7C0F1EE906AD9B868748D74D62E10F2C8275 commandlinetools-linux-6200805_latest.zip" | sha256sum -c \
    && unzip commandlinetools-linux-6200805_latest.zip \
    && rm commandlinetools-linux-6200805_latest.zip

RUN mkdir /opt/android-sdk-linux \
    && mv tools /opt/android-sdk-linux/tools

ENV ANDROID_HOME=/opt/android-sdk-linux
ENV PATH=$PATH:$ANDROID_HOME/tools

RUN echo 'y' | /opt/android-sdk-linux/tools/bin/sdkmanager --sdk_root=/opt/android-sdk-linux --verbose --install "platforms;android-28" "build-tools;28.0.3"

RUN echo 'y' | rm -rf tools

RUN mkdir -p /data/fdroid/repo && \
    mkdir -p /opt/playmaker

COPY README.md setup.py pm-server /opt/playmaker/
ADD playmaker /opt/playmaker/playmaker

WORKDIR /opt/playmaker
RUN pip3 install . && \
    cd /opt && rm -rf playmaker

RUN pip install fdroidserver

RUN groupadd -g 999 pmuser && \
    useradd -m -u 999 -g pmuser pmuser
RUN chown -R pmuser:pmuser /data/fdroid && \
    chown -R pmuser:pmuser /opt/playmaker
USER pmuser

VOLUME /data/fdroid
WORKDIR /data/fdroid

EXPOSE 5000
ENTRYPOINT python3 -u /usr/local/bin/pm-server --fdroid --debug

I'm using it with the repo from @fellek and it is based on the work from @Jonny007-MKD , @crazled and @garrettboone. Thanks a lot for all the support.

@fellek
Copy link

fellek commented Jun 22, 2020

@mlmss thats great, later on I will try to integrate it into my fork / repo.

@000exploit
Copy link

I'm using CentOS 8 with python 3.6 and fdroidserver 1.2.0. On every upstreamed fork still get LoginError: 'server says: BadAuthentication'
(p.s. i don't use docker)

@fellek
Copy link

fellek commented Aug 6, 2020

@mlmss I was trying to build your dockerfile but stoppt by various rights or files missing, running container. thats why the container stops working. did you have similar problems?

error initializing fdroid repository DEBUG: Using androguard from "/usr/local/lib/python3.8/site-packages/androguard/init.py"
CRITICAL: Unknown exception found!
Traceback (most recent call last):
File "/usr/local/bin/fdroid", line 170, in
main()
File "/usr/local/bin/fdroid", line 165, in main
raise e
File "/usr/local/bin/fdroid", line 146, in main
mod.main()
File "/usr/local/lib/python3.8/site-packages/fdroidserver/init.py", line 123, in main
shutil.copy(os.path.join(examplesdir, 'fdroid-icon.png'), fdroiddir)
File "/usr/local/lib/python3.8/shutil.py", line 415, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/local/lib/python3.8/shutil.py", line 261, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/share/doc/fdroidserver/examples/fdroid-icon.png'

@mlmss
Copy link

mlmss commented Aug 6, 2020

@fellek I'm sorry to hear that you have problems. I definitely did not have such issues. By now it is quite a while ago that I did it, so I cannot recall everything and maybe some versions have changed since. I'm on holiday now and cannot check it for the moment. I will do it next week and let you know.

@fellek
Copy link

fellek commented Aug 6, 2020

@mlmss Thanks! Have a nice holiday!

@Findus23
Copy link

Follow-up to #54 (comment)

I just restarted my server and it seems like without any change to the code, I can't log into playmaker any more. I guess Google randomly rate limits or blocks IP addresses.

@mikken
Copy link

mikken commented Oct 19, 2020

As alternative to playmaker, currently it's possible to use Aurora Store from F-Droid (install/updates apps from Play Store, no account is required, it performs some anonymous login) or alternate stores like Aptoide which covers a lot of apps from Play Store (but Aptoide shows ads sometimes).

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

10 participants