Open iamthehunta opened 7 years ago
Looks like 'The' comes from an error page or something. You could try "/awesome.proto" without the leading dot when it's in the root directory.
still getting the same error :/
Im also getting the same error
I am getting this error too. Anyone has the solution?
It appears relative paths are either not working as described or broken in 6.8.0:
var builder = ProtoBuf.load("/Users/asciifaceman/development/project/file.proto");
Works, however
var builder = ProtoBuf.load("./file.proto");
var builder = ProtoBuf.load("/file.proto");
var builder = ProtoBuf.load("file.proto");
do not.
This might be a clarification issue on how relative paths work (if they do at all anymore).
please tell me , How to solve it
Ok, so absolute path works but its worthless on mobile app. I was lucky enough that my web developer provided me link to the same file on web site. So https link inside worked, but i doubt that this is the best idea ever
Hello, have you solved this problem? @iamthehunta @mctang719 @dharmusharma1981 我是在vue.js里面使用的 protobuf.load Uncaught Error: illegal token '<' (awesome.proto, line 1)
If you are seeing an illegal token 'The'
or illegal token '<'
kind of error, that's due to the server responding with a 404ish error page when requesting the proto file, i.e. the file does not exist where protobuf.js looked for it. Can't parse an HTML document. Didn't check what's going on this relevative paths, though.
@dcodeIO Is there any solution to this problem?
Make sure that the file the library requests is present on the server. You can check that by looking at your browser developer console's network log.
I looked at the browser that loaded the awesome. proto file on the server!
.proto must be accessed through your server!
protobuf.js version: