Git Product home page Git Product logo

Comments (10)

remko avatar remko commented on August 30, 2024 1

@FredrikAugust Can you try again with the latest commit?

from dsadmin.

EmmaHorn avatar EmmaHorn commented on August 30, 2024 1

Am I right that you have an entity that has key as a property name?

I was able to reproduce a crash in that situation. I'll fix that.

Yes, we do have an entity with key as a property name.

Thank you for fixing this so quickly!

from dsadmin.

remko avatar remko commented on August 30, 2024

@FredrikAugust I tried it against my test setup with namespaces, but I can't reproduce it yet.

Do you do anything else before switching namespaces?

Can you start a development server (see the README for instructions; you'll want to run it against your own datastore server) and make it crash; this should give more useful backtraces.

from dsadmin.

remko avatar remko commented on August 30, 2024

If I'm not mistaken, the crash is happening in encodeKey, called from the EntitiesTable. This seems to mean that the key doesn't have a partitionId, which is strange (as far as I understand, partitionId is required; i would especially expect it to be there if you have a namespace).

What could help is that you add extra logging in encodeKey to see what the key actually contains (to double check that it actually is a key, but somehow incomplete, or something else).

from dsadmin.

FredrikAugust avatar FredrikAugust commented on August 30, 2024

Hi, thanks for the quick response! I'll try it right away and report back.

from dsadmin.

FredrikAugust avatar FredrikAugust commented on August 30, 2024

Do you do anything else before switching namespaces?

Nope! If it's of any interest, we're running the datastore emulator through a docker image:

  datastore:
    image: google/cloud-sdk:latest
    ports:
      - 8432:8432
    command: |
      gcloud beta emulators datastore start --host-port=0.0.0.0:8432 --use-firestore-in-datastore-mode --project=***

I've started the dev server, and reproduced the crash. The errors I get in the console are the following (I stripped away stack traces from React core):

Uncaught Error: Duplicate columns were found with ids: "key" in the columns array above
    at useTable3 (useTable.js:262:13)
    at Table (Table.tsx:60:7)
The above error occurred in the <Table> component:
    at Table (http://localhost:64645/dist/index.js:40562:5)
    at EntitiesTable (http://localhost:64645/dist/index.js:40758:5)
    at KindTable (http://localhost:64645/dist/index.js:45780:5)
    at div
    at KindPage (http://localhost:64645/dist/index.js:45843:5)
    at Route (http://localhost:64645/dist/index.js:39912:18)
    at Switch (http://localhost:64645/dist/index.js:39943:19)
    at div
    at DatastoreAdminView (http://localhost:64645/dist/index.js:46466:33)
    at Router (http://localhost:64645/dist/index.js:39905:42)
    at APIProvider (http://localhost:64645/dist/index.js:39518:5)
    at QueryClientProvider3 (http://localhost:64645/dist/index.js:23220:27)
    at DatastoreAdmin (http://localhost:64645/dist/index.js:46584:29)
Uncaught Error: Duplicate columns were found with ids: "key" in the columns array above
    at useTable3 (useTable.js:262:13)
    at Table (Table.tsx:60:7)

When browsing the "main page" the key values are:

{
    "partitionId": {
        "projectId": "xxx"
    },
    "path": [
        {
            "kind": "xxx:namespace",
            "name": "xxx"
        }
    ]
}

and the "encoded key" value is:

[
    "xxx",
    "",
    [
        [
            "xxx:namespace",
            "xxx"
        ]
    ]
]

from dsadmin.

remko avatar remko commented on August 30, 2024

Am I right that you have an entity that has key as a property name?

I was able to reproduce a crash in that situation. I'll fix that.

from dsadmin.

FredrikAugust avatar FredrikAugust commented on August 30, 2024

Am I right that you have an entity that has key as a property name?

I was able to reproduce a crash in that situation. I'll fix that.

@EmmaHorn could you confirm or deny this?

from dsadmin.

FredrikAugust avatar FredrikAugust commented on August 30, 2024

@remko Works like a charm with latest commit (ccd3ebc)!

from dsadmin.

remko avatar remko commented on August 30, 2024

Great!

I published a new version with the fix (v0.18.2)

from dsadmin.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.