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

[BUG] - Can't Add Stash URL or API Key #63

Closed
msobadger opened this issue Jan 24, 2024 · 8 comments
Closed

[BUG] - Can't Add Stash URL or API Key #63

msobadger opened this issue Jan 24, 2024 · 8 comments
Labels
bug Something isn't working needs investigation Require more investigation to resolve

Comments

@msobadger
Copy link

Description

I'm unable to enter the URL of my Stash server into the app Settings. When I use the keyboard in the Shield app on my phone to type in the URL (http://[serverIP]:9999) and then click "Done" on the keyboard, it never actually "submits" the info to the app and there's no on-screen "save/ok/submit" button to click. (It's entirely possible I'm missing something simple here.)

Reproduction steps

1. Open the app
2. Open settings (the gear icon at the top-right)
3. Enter the URL of my Stash server using the Shield iOS mobile app's keyboard
4. No apparent way to proceed (tried clicking "done" on mobile keyboard, clicking center button on the remote, center button on remote keyboard, etc)

Device

NVIDIA Shield TV (non-Pro)

Logs

No response

@msobadger msobadger added the bug Something isn't working label Jan 24, 2024
@GenericMale
Copy link

I had a similar issue on my TV. Had to disconnect my bluetooth keyboard and use the virtual keyboard / TV remote to be able to confirm the input.

@damontecres
Copy link
Owner

damontecres commented Jan 24, 2024

I was able to reproduce this using the NVIDIA Shield TV iOS app. I'm not sure what the fix would be, but some workarounds:

  1. Use the Google Home app instead
  2. Enter the info with the NVIDIA Shield TV app making sure it shows on the TV screen
    1. Double click the remote's menu button (or another shortcut for device settings)
    2. Go to Device Preferences->Keyboard->Current keyboard
    3. It's probably on Leanback Keyboard, so switch to Gboard
      1. Even if Gboard is selected, select it and press D-Pad Center on it anyway - do not press Back
    4. Double click the remote's menu button to close device settings
    5. Press D-Pad Center on the remote and the on screen keyboard should appear
    6. Click the bottom right --> button

If using a Fire TV and the keyboard website (from scanning the QR Code), if you paste in the box and press submit, it will not send the text. Instead, paste the URL/API Key, then type a letter and backspace to remove it. The text should show on the TV and then you can press submit!

@msobadger
Copy link
Author

msobadger commented Jan 24, 2024

I was able to reproduce this using the NVIDIA Shield TV iOS app. I'm not sure what the fix would be, but some workarounds:

Thank you! Workaround 2 worked and I'm up and running. Thanks for the great work on this!

@damontecres damontecres added the needs investigation Require more investigation to resolve label Jan 24, 2024
@gotbletu
Copy link

gotbletu commented Apr 8, 2024

tried this on Nvidia Shield and Firestick 4k, can not hit enter/submit/save; used usb wireless mini keyboard, bluetooth keyboard & remote control; all same results

is there a config text file or something that i can edit instead?

@damontecres
Copy link
Owner

damontecres commented Apr 10, 2024

@gotbletu I wish I had a fix, but I can't find anything online about this.

I can offer some tips: "enter" and D-Pad center aren't the same key in Android. "Enter" on a keyboard does not submit the value, only D-Pad center or an App can.

On the Nvidia Shield, does it say "Use the keyboard on your mobile device."? You can try to trigger this message by using the remote and doing:

  1. Go to Settings
  2. Click D-Pad center on "Stash URL"
  3. Click D-Pad center again on the empty (or not) text box

If this message does show, I recommend trying option 2 of the workarounds here again, but I updated the steps for 2.iii: even if Leanback is not selected and GBoard is selected, select GBoard again with D-Pad center. Then follow the remaining steps.

As for the Firestick, I haven't reproduced this at all using the iOS "Fire TV" app, but maybe similar steps above can help.

@damontecres
Copy link
Owner

damontecres commented Apr 10, 2024

is there a config text file or something that i can edit instead?

Yes, but you can probably only edit it if you root the device. A debug build might also be able to write to it with adb exec-out run-as com.github.damontecres.stashapp maybe (you can get a debug build from https://github.com/damontecres/StashAppAndroidTV#develop-build).

On the emulator & my Nvidia shield the file is located at /data/data/com.github.damontecres.stashapp/shared_prefs/com.github.damontecres.stashapp_preferences.xml. Other devices may put this file in a different directory though.

I think a minimal example would be something like this:

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
    <string name="stashUrl">http://192.168.1.99:9999</string>
    <string name="stashApiKey">eyJhbG.....</string> <!-- Only include this line if you enabled auth -->
</map>

I have not tested this at all!

damontecres added a commit that referenced this issue May 14, 2024
Closes #225 

Adds a guide step UI for 1) the initial setup on a new install and 2)
adding, removing, or switching servers.

The setup UI guides a new user in setting their server URL, API key (if
needed), and adding a PIN (if they want). This is much better UX than
getting dropped into the main page with no content and an error message.

Similarly, 5 preferences items are condenses to 2 for adding, removing,
or switching servers. The UX similarly guides the user when adding a new
server.

I did a little testing for pasting text from an phone, but I suspect
there may be similar issues as #63.

Also, the test query is changed so it runs fewer SQL queries on the
server. This may help larger server to connect.
@gotbletu
Copy link

Thanks new updated version works fine now

@damontecres
Copy link
Owner

Since there is a workaround and it seems like the new server management page (#262) isn't affected by this, so I'm going to close this issue.

damontecres added a commit that referenced this issue Nov 9, 2024
Closes #455 

When adding a server (or initial setup), adds a checkbox to make the API
key visible.

Also makes the API key input multi-line so its easier to see.

The recommended way to enter the API key is still to use your phone's
virtual keyboard though. See also
#63 (comment).
@damontecres damontecres pinned this issue Nov 27, 2024
@damontecres damontecres changed the title [BUG] - Can't Add Stash URL [BUG] - Can't Add Stash URL or API Key Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs investigation Require more investigation to resolve
Projects
None yet
Development

No branches or pull requests

4 participants