Giter VIP home page Giter VIP logo

Comments (2)

mwitkow avatar mwitkow commented on July 29, 2024

The error is pretty self-explanatory grpc: received message length 105465393 exceeding the max size 4194304. Basically, gRPC has a default limit of 4MB per message. You're sending in (or claiming to) a message sized 150MB.

You're writing your own serialization library, right? You probably got the endianness wrong when encoding the gRPC payload prefix.

from grpc-web.

sulliwane avatar sulliwane commented on July 29, 2024

For serialization, I'm using protobuf.js implementation, which is also the library used in google grpc-node.

Nothing fancy with the request:
screenshot from 2017-04-17 09-22-23

import protobuf from 'protobufjs';
protobuf.load("package.proto")
.then(function(root) {
  const MessageReq = root.lookup("package.MessageReq");
  const messageReq = MessageReq.create({ symbols: ['IF1609'] })

  fetch('http://localhost:8443/package.Service/GetInstruments', {
    method: 'POST',
    headers: {
      Authorization: xxxx,
      'Content-Type': 'application/grpc-web',
    },
    body: MessageReq.encode(messageReq).finish(),
  })
  .then(response => {
    console.log('response', response) // no response
  })
});

When hitting a local google nginx-grpc-gateway, the proto message request is correctly proxied (my grpc-node server can correctly log the request message).

from grpc-web.

Related Issues (20)

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.