Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goog.asserts.AssertionError #4871

Closed
keep2iron opened this issue Jul 6, 2018 · 2 comments
Closed

goog.asserts.AssertionError #4871

keep2iron opened this issue Jul 6, 2018 · 2 comments

Comments

@keep2iron
Copy link

I have encountered some difficulties.

goog.asserts.AssertionError {message: "Failure: Invalid wire type", reportErrorToServer: true, messagePattern: "Failure: Invalid wire type", stack: "AssertionError: Failure: Invalid wire type↵ at …81/50a1c93a-aa23-44f1-8147-ea869bc10bee:62641:93)"}

I use protobuf on react-native。

        fetch(api.user.create_my_address,fetchOption)
            .then(async (response)=>{

                let value = await response.text()
                let buffer = Buffer.from(value);
                console.log(buffer);

               //Execute here to throw a exception
                let resp = protos.RecommendMainPageResponse.deserializeBinary(buffer)
                console.log(resp.getPostinfoList());
       
            })
            .catch((error)=>{
                console.log(error)
            })
            .done();
@TeBoring
Copy link
Contributor

what's the buffer you passed to deserializeBinary?

@sean3112
Copy link

sean3112 commented Jul 2, 2019

maybe you should sync .proto file with the backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants