MDeLuise / plant-it

🪴 Self-hosted, open source gardening companion app
https://plant-it.org
GNU General Public License v3.0
545 stars 19 forks source link

Malformed Json Exception: main.dart.js #237

Closed Jshanks closed 1 month ago

Jshanks commented 1 month ago

Avoid duplicated bug reports

Description

Trying to add new plants on a portainer deployment - only thing I've initially found not working is adding the plants via trefle. It immediately presents an error when accessing the " search new green friends" page, or when trying to use the search on said page.

Local environment

App version - 0.7.3 (web browser) Server version - 0.6.3 portainer - 2.19.5

error:

[error] | 16:02:34 307ms | com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $
[
    at Object.d (http://192.168.1.123:3003/main.dart.js:5167:19)
    at http://192.168.1.123:3003/main.dart.js:118610:9
    at aUj.a (http://192.168.1.123:3003/main.dart.js:6524:63)
    at aUj.$2 (http://192.168.1.123:3003/main.dart.js:50226:14)
    at aT6.$1 (http://192.168.1.123:3003/main.dart.js:50220:21)
    at Object.aU9 (http://192.168.1.123:3003/main.dart.js:6794:19)
    at a0R.<anonymous> (http://192.168.1.123:3003/main.dart.js:123482:10)
    at a5O.pA (http://192.168.1.123:3003/main.dart.js:51338:12)
    at aJm.$0 (http://192.168.1.123:3003/main.dart.js:50679:11)
    at Object.Ak (http://192.168.1.123:3003/main.dart.js:6670:40), null]

compose:

name: plant-it
services:
  server:
    image: msdeluise/plant-it-server:latest
    env_file: stack.env
    depends_on:
      - db
      - cache
    restart: unless-stopped
    volumes:
      - "/var/lib/docker/volumes/plant-it/upload-dir:/upload-dir"
      - "/var/lib/docker/volumes/plant-it/certs:/certificates"
    ports:
      - "8083:8080"
      - "3003:3000"

  db:
    image: mysql:8.0
    restart: always
    env_file: stack.env
    volumes:
      - "/var/lib/docker/volumes/plant-it/db:/var/lib/mysql" 

  cache:
    image: redis:7.2.1
    restart: always

stack.env:

MYSQL_HOST=db
MYSQL_PORT=3306
MYSQL_USERNAME=root
MYSQL_PSW=root
MYSQL_DATABASE=bootdb
MYSQL_ROOT_PASSWORD=root
JWT_SECRET=putTheSecretHere
JWT_EXP=1
USERS_LIMIT=-1
UPLOAD_DIR=/upload-dir
API_PORT=8080
TREFLE_KEY=[REDACTED]
LOG_LEVEL=DEBUG
ALLOWED_ORIGINS=*
CACHE_TTL=86400
CACHE_HOST=cache
CACHE_PORT=6379
SSL_ENABLED=false
CERTIFICATE_PATH=/certificates/
TREFLE_SSL_VERIFICATION=false
SMTP_HOST=192.168.1.73
SMTP_PORT=25
SMTP_EMAIL=[REDACTED]
SMTP_AUTH=false
CONTACT_MAIL=[REDACTED]

Log: https://pastebin.com/raw/TXSBPyv1

Jshanks commented 1 month ago

Reading a bit further into #218, specifically this comment, I suspect this is known already, so we can just disregard this issue that I've submitted.