Error when running fdroid readmeta command

I followed the Submitting to F-droid guide . I followed all the instructions and when it came to running the command : fdroid readmeta, it gave this error

2024-09-29 11:02:03,473 CRITICAL: Unknown exception found!
Traceback (most recent call last):
 File "/home/vagrant/fdroidserver/fdroid", line 22, in <module>
   fdroidserver.__main__.main()
 File "/home/vagrant/fdroidserver/fdroidserver/__main__.py", line 222, in main
   raise e
 File "/home/vagrant/fdroidserver/fdroidserver/__main__.py", line 203, in main
   mod.main()
 File "/home/vagrant/fdroidserver/fdroidserver/readmeta.py", line 32, in main
   metadata.read_metadata()
 File "/home/vagrant/fdroidserver/fdroidserver/metadata.py", line 566, in read_metadata
   Path(basedir).mkdir(exist_ok=True)
 File "/usr/lib/python3.11/pathlib.py", line 1117, in mkdir
   os.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: 'tmp'

This is my first time submitting an app. I’m using react native to build my app and using wsl for submitting guide

The error is pretty clear… allow it to create a tmp folder there, maybe you can create it before running the command?

Are you running Docker inside of Windows Subsystem for Linux?

How can I allow it? Where to create tmp folder?

afaik it tries to create a local folder there in fdroiddata, well it creates more than one, as needed

I have it installed on my windows and wsl can use it since docker requires wsl to run

How can I allow it?

1 Like

Within the docker container (that is, after having issued the command “sudo docker run”), type

cd /build
sudo mkdir tmp logs unsigned repo

It worked thank you so much.
But the next command fails:

vagrant@cfc55927500c:/build$ fdroid rewritemeta com.launchr
2024-10-02 10:36:38,058 INFO: Rewriting 'com.launchr'
2024-10-02 10:36:38,063 CRITICAL: Unknown exception found!
Traceback (most recent call last):
  File "/usr/lib/python3.11/shutil.py", line 825, in move
    os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/tmp/tmplt2upd3m/com.launchr.yml' -> 'metadata/com.launchr.yml'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vagrant/fdroidserver/fdroid", line 22, in <module>
    fdroidserver.__main__.main()
  File "/home/vagrant/fdroidserver/fdroidserver/__main__.py", line 222, in main
    raise e
  File "/home/vagrant/fdroidserver/fdroidserver/__main__.py", line 203, in main
    mod.main()
  File "/home/vagrant/fdroidserver/fdroidserver/rewritemeta.py", line 111, in main
    shutil.move(tmp_path, path)
  File "/usr/lib/python3.11/shutil.py", line 845, in move
    copy_function(src, real_dst)
  File "/usr/lib/python3.11/shutil.py", line 436, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.11/shutil.py", line 258, in copyfile
    with open(dst, 'wb') as fdst:
         ^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'metadata/com.launchr.yml'
vagrant@cfc55927500c:/build$

I don’t know why the permission gets denied. Is it not possible in wsl?

Hmm. This is more a question for the experts. I myself are only wildly guessing.

What I usually do is to change all file ownerships to avoid permission issues:

sudo chown -R vagrant *

Don’t know if this is the way to do it.

Thanks, it worked. I’m a complete beginner, I have one more question.
So in my keystore file is not committed to github. How fdroid is gonna build the file?
The app would only work with my keystore since its sha key has access to my firebase
Do I need to include the keystore and googleservices.json file in some way. Sorry if this sounds stupid, I don’t know what I’m doing

firebase libs are not free software or open source, or depends on google services libs, right?

F-Droid can’t include that in the first place: Inclusion Policy | F-Droid - Free and Open Source Android App Repository

can you link to your app source?

Sure, here it is

these are not allowed: https://github.com/SudhaRatan/Budgetr/blob/master/package.json#L19-L22 at least

/PS: do add a LICENSE file :slight_smile:

What!
Those are opensource right?

you tell me, as you’ve done your research before integrating them, yes? :person_shrugging:

let’s look

react-native-firebase/packages/app/android/build.gradle at main · invertase/react-native-firebase · GitHub nope

and google-signin/android/build.gradle at master · react-native-google-signin/google-signin · GitHub nope

…as they can’t be built without proprietary Google dependencies

Are there any alternatives to those?

2 Likes

to integrate with Google Firebase? Not sure

What do you do with it exactly? You code has no description :slight_smile:

I’m quite a beginner. Will add it.
I use it for authorizing users with their google accounts, I can probably replace playservices sign in with google sign in.
And I’m also using firestore for storing user data.

It is a finance tracking app.
I’m also planning on publishing an android launcher

This doesn’t have any of those dependencies
Hope this wil work