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

Guidance on how to collect logs and info for proper issues reporting #79

Open
maxiride opened this issue Apr 15, 2021 · 2 comments
Open

Comments

@maxiride
Copy link

maxiride commented Apr 15, 2021

I managed to install the Tizen Client on my Samsung TV, occasionally I encounter a bug here and there, however I have no knowledge on how to interact with the TV at the developer level.

To avoid opening tickets with sparse info and lack of logs which would only be "noise" in the repo, can we get some instructions on how to inspect the application logs (if there are any) when the app runs on the TV?

  • How can we collect the TV logs?
  • How can we collect Jellyfin logs? Both server and client side?
@dmitrylyzo
Copy link
Collaborator

dmitrylyzo commented Apr 18, 2021

You can find server logs in Dashboard (folder on the main page and individual log files in Logs menu).

As for client logs, all I can suggest is to launch it from Tizen Studio - it will open Chrome and you will get the console. But it will reinstall app every time you launch app, so you will lose your local storage data. Also you need to build dev-version of jellyfin-web and set up Tizen project (I didn't put project files in the repo - I am not sure if I should, and they are weird because of node_modules).

Alternatively, if you are using Linux, you can try the following.

  1. Build dev-version of jellyfin-web:
SKIP_PREPARE=1 npm ci --no-audit    # once per clone/pull to install deps
npm run build:development
  1. Prepare interface and build WGT as before.
  2. Connect to TV with Device Manager.
  3. Install WGT.
  4. Use script to run app on TV and open Chrome:
#!/bin/bash

TIZEN_DIR="$HOME/tizen-studio"
TIZEN_DATA_DIR="$HOME/tizen-studio-data"
TIZEN_APP=AprZAARz4r.Jellyfin

# TV
DEVICE_IP=<your_tv_ip>
DEVICE=$DEVICE_IP:26101

# Emulator
#DEVICE_IP=127.0.0.1
#DEVICE=emulator-26101

SDB="$TIZEN_DIR/tools/sdb"

# Tizen 3: 0 at the end (timeout)
# Tizen 5+: without the last argument (timeout)
port=$("$SDB" -s $DEVICE shell 0 debug "$TIZEN_APP")
[ $? -eq 0 ] || exit 1
if ! echo "$port" | grep 'port:'; then
    echo "$port" >&2
    exit 1
fi
port=$(echo "$port" | grep 'port:' | sed 's/.*port: \([0-9]\+\).*/\1/')
echo "Port: $port"

echo "Remove port forwarding"
"$SDB" forward --remove tcp:$port
echo "  >$?"

echo "Forward port $port"
"$SDB" -s $DEVICE forward tcp:$port tcp:$port || exit 1

chromium-browser \
    --enable-pinch \
    --no-first-run \
    --activate-on-launch \
    --no-default-browser-check \
    --allow-file-access-from-files \
    --disable-web-security \
    --disable-translate \
    --proxy-auto-detect \
    --proxy-bypass-list=127.0.0.1 \
    --enable-blink-features=ShadowDOMV0 \
    --enable-blink-features=CustomElementsV0 \
    --user-data-dir="$TIZEN_DATA_DIR/chrome-user-data" \
    --app="http://$DEVICE_IP:$port"

I haven't found a way to close the app, so you need to close it in order to restart the script.

@HimbeersaftLP
Copy link

Here is my tutorial for running debugging without the IDE on Windows:
#46 (comment)

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

3 participants