contentstack / app-sdk Goto Github PK
View Code? Open in Web Editor NEWThe Contentstack App SDK allows you to customize your applications.
License: MIT License
The Contentstack App SDK allows you to customize your applications.
License: MIT License
Hello. I'm trying to upload an asset using the UploadAssetModal
component from the @contentstack/venus-components
library, and the Asset.uploadAsset()
method from @contentstack/app-sdk
.
The Asset.uploadAsset
method returns the error "No handler found for post message: stackOptionsQuery from http://localhost:3000 in ...", full error message is provided below.
The simplified setup is as follows.
const uploadAssetProps: any = {
sdk,
onSubmit,
only: "code",
multiple: false,
upload: ({ files, options }: any) => {
return sdk?.stack.Asset.uploadAsset(files, options)
.then((res) => console.log('Upload result', res))
.catch((err) => console.log('Upload error' ,err));
};
<Button onClick={() => openUploadAssetModal(uploadAssetProps)}>
Upload Asset
</Button>
Error message:
Upload error Error: No handler found for post message: stackOptionsQuery from http://localhost:3000 in https://app.contentstack.com/
at eval (eval at e.exports (vendor.bundle.js:1:1), <anonymous>:2000:23)
at ZalgoPromise.try (eval at e.exports (vendor.bundle.js:1:1), <anonymous>:1303:29)
at exports.RECEIVE_MESSAGE_TYPES._RECEIVE_MESSAGE_TYPE.<computed> [as postrobot_message_request] (eval at e.exports (vendor.bundle.js:1:1), <anonymous>:1998:34)
at receiveMessage (eval at e.exports (vendor.bundle.js:1:1), <anonymous>:1896:57)
at messageListener (eval at e.exports (vendor.bundle.js:1:1), <anonymous>:1916:9)
at rt.<computed> [as postrobot_message_response] (index.js:2:23116)
at ft (index.js:2:24840)
at dt (index.js:2:24896)
Debug output by @contentstack/app-sdk
:
[post-robot] fullpage :: app.contentstack.com/
#send response :: stackOptionsQuery :: http://localhost:3000
{
ack: "error",
code: undefined,
data: undefined,
domain: "http://localhost:3000",
error: "No handler found for post message: stackOptionsQuery from http://localhost:3000 in https://app.contentstack.com/\n at eval (eval at e.exports (https://app.contentstack.com/vendor.bundle.js?v=1.2.4:1:1), <anonymous>:2000:23)\n at ZalgoPromise.try (eval at e.exports (https://app.contentstack.com/vendor.bundle.js?v=1.2.4:1:1), <anonymous>:1303:29)\n at exports.RECEIVE_MESSAGE_TYPES._RECEIVE_MESSAGE_TYPE.<computed> [as postrobot_message_request] (eval at e.exports (https://app.contentstack.com/vendor.bundle.js?v=1.2.4:1:1), <anonymous>:1998:34)\n at receiveMessage (eval at e.exports (https://app.contentstack.com/vendor.bundle.js?v=1.2.4:1:1), <anonymous>:1896:57)\n at messageListener (eval at e.exports (https://app.contentstack.com/vendor.bundle.js?v=1.2.4:1:1), <anonymous>:1916:9)"
hash: "stackOptionsQuery_bb3c7fbad8",
id: "58ee04db3d",
name: "stackOptionsQuery",
sourceDomain: "https://app.contentstack.com",
target: undefined,
type: "postrobot_message_response",
windowType: "fullpage"
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.