Comments (6)
Could you share us the browser's version? It's possible that the browser filter out the content-transfer-encoding header.
We already noticed that, and it's get resolved by #68 and #71
Please sync to the head and give a try.
from grpc-web.
Here are the browsers I tested (on local Ubuntu 16.04, requesting the remote nginx gateway on Centos7):
- Chromium Version 56.0.2924.76 Built on Ubuntu , running on Ubuntu 16.04 (64-bit) NOT OK
- Chrome Version 57.0.2987.98 (64-bit) NOT OK
- Firefox 52.0.1 (64-bit) OK
Note: I'm not using the docker images (always stuck at compilation time) so I follow the "manual mode" detailed here. This may be the problem, as my git submodules may not be checked out at the proper commit, if the manual guide instructions are not kept in sync with the docker script.
This time, on my remote Centos7 machine, I first executed ./init_submodules.sh
and recompiled nginx-gateway, but still the same problem.
thanks for your help
from grpc-web.
It's not about the submodules, it's for the grpc/grpc-web itself, did you sync to the head?
from grpc-web.
Yes this is a good doc to follow to build the example.
And can you execute this in the root directory of your grpc-web repo? git log -1 --oneline
from grpc-web.
I misunderstood, I thought it was a problem with nginx-gateway.
cd grpc-web
git pull # my local repo was indeed not up to date
git log -1 --oneline
8230b9b Merge pull request #86 from stanley-cheung/master
So now I just reproduced my JS bundle:
cd javascript/net/grpc/web && make # maybe not needed
protoc -I=. --js_out=import_style=closure,binary:. ./myProto.proto # JS Messages definitions
protoc -I=. --plugin=protoc-gen-grpc-web=<path to plugin> \
--grpc-web_out=out=echo.grpc.pb.js,mode=base64:. ./myProto.proto # JS Stub definition
./third_party/closure-library/closure/bin/build/closurebuilder.py # cosurebuilder, with all the roots to the newly generated JS + required libraries
Opening the browser, and testing again against my remote nginx-gateway (which I had recompiled before), bam it worked!!!
But then the problem appeared when hitting my local nginx-gateway. So I recompiled the local nginx-gateway, and it solved the problem. So not only the JS had to be updated, but the nginx-gateway had to be recompiled.
Side note: I noticed that the client service methods naming convention changed (it's now lowercase for the first letter, which makes more sense on the JS standpoint, and is harmonized with the grpc-node naming convention) 👍 .
from grpc-web.
Yes, I remember the fix where we lowercase the first letter of the RPC method name. It was quite recent. We have made tons of changes recently, both on the gateway side and the JS client side so yes it's expected that you need to re-compile both the gateway and the JS client.
Glad that it works for you now!
from grpc-web.
Related Issues (20)
- Are there any plans to simplify the request HOT 2
- Is there a proto-loader for gRPC-web? HOT 2
- Please ignore...
- > It's working for grpc-web + protobuf.js. I hope it helps somebody. HOT 2
- stream.cancel doesn't close the stream HOT 2
- Why optional message types compile inconsistently? HOT 5
- Closure Migration & Typescript-ification HOT 4
- Grpc-web not return exactly grpc status always response 2 Incomplete response HOT 7
- Why generated files doesn't have implemented classes? HOT 2
- Difficulty building under Alpine 3.19 HOT 1
- How to connect a docker-run Go gRPC server to a React app?
- Client does not report correct error codes per the spec for HTTP status code mapping HOT 1
- Compression handling uses wrong error codes HOT 1
- Cardinality violations should use error code “unimplemented” HOT 2
- gRPC errors in nice-grpc-web come back as undefined in angular 18 in optimized builds with zonejs HOT 2
- Getting Error: Assertion failed in reactjs request HOT 1
- protobuf generator relies on private APIs HOT 5
- `protoc-plugin` image is currently broken HOT 4
- Not able to view the emualtor on the web browser HOT 11
- Use bzlmod for bazel build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grpc-web.