Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. English
  3. Development
  4. Adapter dev: Migration from "No Tab" to "React Tab" fails

NEWS

  • Neuer ioBroker-Blog online: Monatsrückblick März/April 2026
    BluefoxB
    Bluefox
    6
    1
    216

  • Verwendung von KI bitte immer deutlich kennzeichnen
    HomoranH
    Homoran
    8
    1
    216

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    890

Adapter dev: Migration from "No Tab" to "React Tab" fails

Scheduled Pinned Locked Moved Development
3 Posts 1 Posters 723 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stev-io
    wrote on last edited by
    #1

    Hi there!

    Situation:
    I am in the process of developing an adapter. I terms of a UI I began with no extra tab for the adapter. Now I want to create a tab and want to realize it with React. Therefore I created a fresh adapter with the help of adapter-creator with all relevant options set for a React tab. When I launch a dev-server instance for this newly created adapter everything is fine.

    So I began to adapt all the neccessary settings that I could find from all the different files from the newly created adapter to my adapter in development.

    Problem:
    The adapter in development does not render the react page but does render something different. For a better view here are two comparisons as a picture:
    Source: Here you see what effectively is deployed within a dev-server instance. On the left hand side for the adapter in development and on the right the newly created adapter.
    f478dce0-35f9-4250-bd00-b6e8e6f90d2e-grafik.png

    Runtime-Markup: Here you can see, what effectively gets rendered. On the left hand side for the adapter in development and on the right the newly created adapter.
    2878bc71-c114-43a4-880a-f7795cabfc8f-grafik.png

    From my understanding something is going on during the compile step that breaks things. Maybe somewhere there it is not clear to the build chain that a React tab is the goal and instead some boilerplate for... maybe Materialized tabs or so... is pulled?
    Is somebody out there that has a clue, what I need to check?

    Maybe a few settings that I guess are important for the build step...

    // io-package.json
    "adminUI": {
                "config": "json",
                "tab": "materialize"
            },
            "adminTab": {
                "singleton": false,
                "name": {
                    // ...
                },
                "link": "",
                "fa-icon": "info"
            },
    
    // package.json
        "build": "build-adapter all",
        "build:backend": "build-adapter ts",
        "build:admin": "build-adapter react",
    
    // admin/tsconfig.json
    // Specialized tsconfig for the admin directory,
    // includes DOM typings and configures the admin build
    {
        "extends": "../tsconfig.json",
        "compilerOptions": {
            "noEmit": false,
            "outDir": "./build",
            "sourceMap": true,
            "sourceRoot": "./src",
            "noImplicitAny": false,
            "lib": ["es2018", "DOM"],
            "jsx": "react"
        },
        "include": ["./**/*.ts", "./**/*.tsx", "../src/lib/adapter-config.d.ts"],
        "exclude": ["./**/*.test.ts", "./**/*.test.tsx"]
    }
    
    1 Reply Last reply
    0
    • S Offline
      S Offline
      stev-io
      wrote on last edited by
      #2

      Small update: I realized that browser-sync is the one interfering with my React component.

      If one takes a closer look at the screenshot I provided, than one can see that browser-sync is loaded where it should'nt:
      34caea1c-465a-4a14-a25c-20a9d9612070-grafik.png On the left side it is loaded as part of the IFrame containing the tab. On the right side it is not loaded as part of the tab. Instead it is loaded in the parent frame:
      5863aff6-0197-4c69-8fbc-368d61ecfce2-grafik.png

      The effect that browser-sync has here is that it injects the code one can see for all admin/*html files like it does in my case but thats a misbehavior and I guess only intended to happen in the parent frame?
      cab6d13b-df5e-4e9d-8958-1d19a80df597-grafik.png

      Now I thought that might be because I installed dev-server as a local dev-dependency and this somehow pulls in the browser-sync script. But thats not the reason as far as I could test.

      S 1 Reply Last reply
      0
      • S stev-io

        Small update: I realized that browser-sync is the one interfering with my React component.

        If one takes a closer look at the screenshot I provided, than one can see that browser-sync is loaded where it should'nt:
        34caea1c-465a-4a14-a25c-20a9d9612070-grafik.png On the left side it is loaded as part of the IFrame containing the tab. On the right side it is not loaded as part of the tab. Instead it is loaded in the parent frame:
        5863aff6-0197-4c69-8fbc-368d61ecfce2-grafik.png

        The effect that browser-sync has here is that it injects the code one can see for all admin/*html files like it does in my case but thats a misbehavior and I guess only intended to happen in the parent frame?
        cab6d13b-df5e-4e9d-8958-1d19a80df597-grafik.png

        Now I thought that might be because I installed dev-server as a local dev-dependency and this somehow pulls in the browser-sync script. But thats not the reason as far as I could test.

        S Offline
        S Offline
        stev-io
        wrote on last edited by
        #3

        Long story short: I opened this issues to solve the root cause: https://github.com/ioBroker/dev-server/issues/471

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        Support us

        ioBroker
        Community Adapters
        Donate

        494

        Online

        32.8k

        Users

        82.8k

        Topics

        1.3m

        Posts
        Community
        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
        ioBroker Community 2014-2025
        logo
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Home
        • Recent
        • Tags
        • Unread 0
        • Categories
        • Unreplied
        • Popular
        • GitHub
        • Docu
        • Hilfe