# Error undefined symbol uplink request access with passphrase setting up access to storj project

**URL:** <https://forum.storj.io/t/error-undefined-symbol-uplink-request-access-with-passphrase-setting-up-access-to-storj-project/21488>\
**Category:** troubleshooting\
**Tags:** bindings-android\
**Created:** [February 19, 2023, 10:59pm UTC](https://forum.storj.io/t/error-undefined-symbol-uplink-request-access-with-passphrase-setting-up-access-to-storj-project/21488 "2023-02-19T22:59:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucaferro](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/lucaferro/32/7822_2.png) [@lucaferro](https://forum.storj.io/u/lucaferro)\
**Post date:** [February 19, 2023, 10:59pm UTC](https://forum.storj.io/t/error-undefined-symbol-uplink-request-access-with-passphrase-setting-up-access-to-storj-project/21488/1 "2023-02-19T22:59:30Z")

</div>

Hello,  
I am new at Storj, I am testing it a little bit in a simple android app before developing the complex one.  
I have problems in the very first steps. Following the readme, I have added the dependency in the build.gradle and the app builds correctly but I have runtime error when I execute the following code:

this.uplink = new Uplink();  
try {  
this.access = uplink.requestAccessWithPassphrase(satelliteAddress,serializedApiKey,passphrase);  
}catch (StorjException e){  
Log.e(“STORJ”, e.toString());  
}

The error:  
E/AndroidRuntime: FATAL EXCEPTION: main  
Process: com.example.teststorj, PID: 10041  
java.lang.UnsatisfiedLinkError: Error looking up function ‘uplink\_request\_access\_with\_passphrase’: undefined symbol: uplink\_request\_access\_with\_passphrase  
at com.sun.jna.Function.(Function.java:252)  
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:600)  
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:576)  
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:562)  
at com.sun.jna.Library$Handler.invoke(Library.java:243)  
at java.lang.reflect.Proxy.invoke(Proxy.java:1006)  
at io.storj.$Proxy5.uplink\_request\_access\_with\_passphrase(Unknown Source)  
at io.storj.Uplink.requestAccessWithPassphrase(Uplink.java:65)  
at com.example.teststorj.MainActivity.initializeStorj(MainActivity.java:60)

It seems like it is not seeing correctly the library code but I don’t know what to do because I have just added the dependency and tried this in my main activity and the app compiles correctly.  
The three parameters have the correct value, and the error message doesn’t seem caused from a possible wrong key.

What can be the cause?

Hope everything is clear

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 21, 2023, 4:09am UTC](https://forum.storj.io/t/error-undefined-symbol-uplink-request-access-with-passphrase-setting-up-access-to-storj-project/21488/2 "2023-02-21T04:09:34Z")

</div>

I guess, you are trying the binding for Java from there: [GitHub - storj/uplink-java: Storj network Java library](https://github.com/storj/uplink-java)  
Did you build the `uplink-c` binary as required?

> You need the [uplink-c](https://github.com/storj/uplink-c) binary, which can be built with `./scripts/build-uplink.sh` .

Have you tried to build an example app from there?

---

<div class="post-metadata">

**Author:** ![kaloyan](https://storj.bcdn.literatehosting.com/letter_avatar/kaloyan/32/5_5575768a8748004e209b776fc1b2916d.png) [@kaloyan](https://forum.storj.io/u/kaloyan)\
**Post date:** [February 21, 2023, 10:17am UTC](https://forum.storj.io/t/error-undefined-symbol-uplink-request-access-with-passphrase-setting-up-access-to-storj-project/21488/3 "2023-02-21T10:17:01Z")

</div>

@lucaferro It’s hard to say why this error happens without knowing more about your app setup.

Here is what I have done to test the Storj Android library quickly:

1. Downloaded and installed the latest Android Studio.
2. Created a new virtual device.
3. Created a new project with Basic Activity and all defaults.
4. Added the `implementation 'io.storj:uplink-android:1.0.0-rc.1'` dependency to `app/build.gradle`.
5. Added `android.enableJetifier=true` to `gradle.properties`. Otherwise, the build complains that the Storj library is a legacy one.
6. Added `<uses-permission android:name="android.permission.INTERNET"/>` to `app/src/main/AndroidManifest.xml`.
7. Modified the code of the `OnClickListener` of the `onCreate` method in `app/src/main/java/com/example/myapplication/MainActivity.kt` to look like this:

```auto
binding.fab.setOnClickListener { view ->
    val satelliteAddress = "12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S@us1.storj.io:7777"
    val serializedApiKey = "redacted"
    val passphrase = "super secret passphrase"
    val uplink = Uplink()
    val access = uplink.requestAccessWithPassphrase(satelliteAddress, serializedApiKey, passphrase)
    Snackbar.make(view, access.serialize(), Snackbar.LENGTH_LONG)
            .setAction("Action", null).show()
}

```

Now, when you run the app and tap on the action button in the bottom right corner, it will execute the above the code and will display the result access grant.

I hope this helps.

---

<div class="post-metadata">

**Author:** ![lucaferro](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/lucaferro/32/7822_2.png) [@lucaferro](https://forum.storj.io/u/lucaferro)\
**Post date:** [February 21, 2023, 5:40pm UTC](https://forum.storj.io/t/error-undefined-symbol-uplink-request-access-with-passphrase-setting-up-access-to-storj-project/21488/4 "2023-02-21T17:40:47Z")

</div>

Sorry that wasn’t clear, right now I am using [GitHub - storj/uplink-android: Storj network Android library](https://github.com/storj/uplink-android).  
Following its readme the gradle dependency should be all I need but it seems like something isn’t building the right way and I don’t find any build-uplink file in my project

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 22, 2023, 5:47am UTC](https://forum.storj.io/t/error-undefined-symbol-uplink-request-access-with-passphrase-setting-up-access-to-storj-project/21488/5 "2023-02-22T05:47:10Z")

</div>

I see. This documentation seems outdated and doesn’t contain everything needed to get libraries.  
Have you tried the suggestion above?

---

<div class="post-metadata">

**Author:** ![lucaferro](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/lucaferro/32/7822_2.png) [@lucaferro](https://forum.storj.io/u/lucaferro)\
**Post date:** [February 22, 2023, 9:39pm UTC](https://forum.storj.io/t/error-undefined-symbol-uplink-request-access-with-passphrase-setting-up-access-to-storj-project/21488/6 "2023-02-22T21:39:50Z")

</div>

Thank you for the answer. These are the same steps I did when I added storj code into a small other project I had where I made users take a picture to upload. For some reasons it didn’t work there but, as suggested in your answer, retrying in a new project with some fixes seems to work.  
I am not sure if it was a strange combination of plugins which conflicted ore some changes in the manifest (for example I did not know that for api\>30 was needed package name declaration.

After these changes I managed to integrate the storj in the old project’s functionality.  
I am very grateful to both of you

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 23, 2023, 5:39am UTC](https://forum.storj.io/t/error-undefined-symbol-uplink-request-access-with-passphrase-setting-up-access-to-storj-project/21488/7 "2023-02-23T05:39:20Z")

</div>

A post was split to a new topic: [Is there a way to get the share link of an uploaded file through an api call?](https://forum.storj.io/t/is-there-a-way-to-get-the-share-link-of-an-uploaded-file-through-an-api-call/21538)
