Repository navigation
Closed
Labels
api: visionIssues related to the Cloud Vision API.Issues related to the Cloud Vision API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
While trying to run google-vision-api with a Scala project I'm getting the following exception.
io.grpc.ManagedChannelProvider$ProviderNotFoundException: No functional channel service provider found. Try adding a dependency on the grpc-okhttp or grpc-netty artifact
at io.grpc.ManagedChannelProvider.provider(ManagedChannelProvider.java:126)
at io.grpc.ManagedChannelBuilder.forAddress(ManagedChannelBuilder.java:45)
at com.google.api.gax.grpc.InstantiatingChannelProvider.createChannel(InstantiatingChannelProvider.java:129)
at com.google.api.gax.grpc.InstantiatingChannelProvider.getChannel(InstantiatingChannelProvider.java:116)
at com.google.api.gax.grpc.ChannelAndExecutor.create(ChannelAndExecutor.java:65)
at com.google.api.gax.grpc.ClientSettings.getChannelAndExecutor(ClientSettings.java:77)
at com.google.cloud.vision.spi.v1.ImageAnnotatorClient.<init>(ImageAnnotatorClient.java:120)
at com.google.cloud.vision.spi.v1.ImageAnnotatorClient.create(ImageAnnotatorClient.java:111)
at com.google.cloud.vision.spi.v1.ImageAnnotatorClient.create(ImageAnnotatorClient.java:102)
I have tried changing the grpc-netty version and the http2 dependency from netty codec version as well. I also tried excluding the library and replacing it with grpc-okhttp to no hope!
Appreciate any help here
Metadata
Metadata
Assignees
Labels
api: visionIssues related to the Cloud Vision API.Issues related to the Cloud Vision API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Activity
vam-google commentedon May 23, 2017
Hi @mamdouhweb, please provide your project dependencies configuration (i.e. which artifacts and versions you depend on). Also, does it work if you try to do the same thing in java (i.e. is it specific to scala)?
mamdouhweb commentedon May 23, 2017
@vam-google thanks for the quick reply. I haven't tried it in Java, I'm assuming it works as you guys have it in the examples.
as for my dependency list:
I also ran dependency tree command and I can see grpc-netty, here's a screen shot that might be helpful
mamdouhweb commentedon May 23, 2017
Addendum:
Cloud vision version is
Further, here's the code I'm using to test the library
mamdouhweb commentedon May 23, 2017
After a fight with this issue, it is fixed now!
The main cause of the issue is the horrifying combination between
io.netty.versions.propertiesandsbt assemblyThat said, this is definitely not a bug, and I apologize for taking your time @vam-google
For anyone in the future who might face the same problem, just add the following line in your
projectAssemblySettingsvam-google commentedon May 23, 2017
Good to hear that it is not a bug =). Closing the issue.
refactor: Json to proto message refactoring (#2085)
deps: update dependency com.google.cloud:google-cloud-spanner to v6.9…
build(deps): update dependency com.google.cloud:google-cloud-shared-c…
build(deps): update dependency com.google.cloud:google-cloud-shared-c…
chore(deps): update dependency com.google.cloud:google-cloud-firestor…
deps: update dependency com.google.cloud:sdk-platform-java-config to …
chore(main): release 2.33.0 (googleapis#2090)