aws-amplify / aws-amplify/amplify-hosting
Amplify Data Manager crashes when viewing item with an array of a custom type
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
### Environment information
```plain text
System:
OS: macOS 15.4.1
CPU: (16) arm64 Apple M3 Max
Memory: 234.05 MB / 48.00 GB
Shell: /bin/zsh
Binaries:
Node: 23.7.0 - /opt/homebrew/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.9.2 - /opt/homebrew/bin/npm
pnpm: 10.2.0 - ~/Library/pnpm/pnpm
NPM Packages:
@aws-amplify/auth-construct: 1.8.1
@aws-amplify/backend: 1.16.1
@aws-amplify/backend-ai: Not Found
@aws-amplify/backend-auth: 1.7.1
@aws-amplify/backend-cli: 1.7.2
@aws-amplify/backend-data: 1.6.1
@aws-amplify/backend-deployer: 2.1.1
@aws-amplify/backend-function: 1.14.1
@aws-amplify/backend-output-schemas: 1.6.0
@aws-amplify/backend-output-storage: 1.3.1
@aws-amplify/backend-secret: 1.4.0
@aws-amplify/backend-storage: 1.4.1
@aws-amplify/cli-core: 2.1.1
@aws-amplify/client-config: 1.7.0
@aws-amplify/data-construct: 1.16.1
@aws-amplify/data-schema: 1.17.2
@aws-amplify/deployed-backend-client: 1.7.0
@aws-amplify/form-generator: 1.2.1
@aws-amplify/model-generator: 1.2.0
@aws-amplify/platform-core: 1.9.0
@aws-amplify/plugin-types: 1.10.1
@aws-amplify/sandbox: 2.1.2
@aws-amplify/schema-generator: 1.4.0
@aws-cdk/toolkit-lib: 0.3.2
aws-amplify: 6.14.4
aws-cdk-lib: 2.196.0
typescript: 5.8.3
No AWS environment variables
No CDK environment variables
```
### Describe the bug
When selecting an item containing an array of a custom type via the Amplify data manager interface, the interface crashes. Displaying "Something went wrong. Please try again later."
Browser console output displays:
TypeError: Cannot read properties of undefined (reading 'call')
at za (chunk.8720.js:1:256968)
...
at E (remoteEntry.js:77:1364)
### Reproduction steps
1. Define a custom type & model utilizing custom type:
```js
Type1: a.customType({
field1: a.string(),
}),
```
```js
Project: a
.model({
name: a.string().required(),
...
type1s: a.ref('Type1').array(),
}).authorization(allow => [
allow.owner(),
],),
```
2. Create a new Project item in the database, populate it with a custom type entry programatically.
```js
const list = [];
list.push({
field1: "example content",
});
await client.models.Project.update({
type1s: list,
});
```
3. Open Amplify data-manager
4. Select item -> encounter error.
Contributor guide
Research direction
Reproduce the crash in Amplify Data Manager using the custom type array and inspect the browser console error when selecting the Project item. Trace the failing data-display path from the generated stack trace; done means items containing arrays of custom types can be opened without the error screen.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript, typescript
- Domain
- databases, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100