-
Notifications
You must be signed in to change notification settings - Fork 39
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
SmartHomeApp.reportState error #30
Comments
No, this means that the channel to Dialogflow API is not closed programmatically. |
Thank you for reply!
|
You could try something like this :
|
I've not seen that error before. Has it only begun happening recently? How are you hosting the code? |
This error has been around, causing my application to die because of increased memory.I just used the method |
How are you hosting the code? Google App Engine? Some other provider like AWS? |
AWS |
Can you try the suggestion that @cbeaujoin created? Maybe the channel needs to be shutdown after use, or instantiated once in the run environment instead of being continually created? I've not seen any memory issues, so this may be useful for performance improvements. |
I have the same error when using report state. How should i try the suggestions? Changing the code and building the project? |
Does shutting down the channel work after it is used? |
I dont know what you are talking about? I am using just SmartHomeApp.reportState. |
BTW I have a working implementation for node, i just converted this app to java because node sucks ;-) And now I get this error. So the error has to be in the java implementation. After having done all the work i am very frustrated to see that the java implementation has so much errors. This all feels like an early alpha version. I expect better from a company like google. Switching to Alexa becomes more and more attractive, not only because of the much wider supported device range, the development happens so much faster over there. |
@RayBa82 if you look at the source code for the library, you will see the underlying gRPC implementation. Are you also using AWS for hosting your project? |
I am hosting it on my own server. I have zero experience with gRPC, so I would have to dig into it. |
Can you try copying the suggested function @cbeaujoin has and calling that instead of the current function? |
Ok now i got it, I will try that tonight CET ;-) |
Thanks. Let me know. I have not experienced any issues running on Google App Engine, so it'll be interesting to see if the behavior exists in other instances. |
This really seems to fix the problem. I could not reproduce the error with the fix. |
This code works without any problem: waiting for termination seems not to be necessary EDIT: Without waiting for termination the error occured sometimes again, so better not remove it :-) |
Just for further Info: This error never happened with a single request. But if my applications was sending multiple report state requests per second (about 6) this error has always been reproducable. Maybe you can reproduce this with a load test in App Engine too. |
Hi, I had the same problem using the google-cloud-dialogflow lib and I don't exactly remind the cause. |
@proppy can you assist with this issue? |
@Fleker How is this issue? Because of this issue, I have to turn off the report function.For authentication i have to use this function now.Please fix it soon,thank you! |
None of the solutions with manually closing the channel worked for me in the long run. After some time the error always occured again. What actually worked for me is making But i have to say im running a spring boot application and my SmartHomeApp class is a spring bean. So i only have one instance of the class for my whole application. But this is running stable without any error over weeks. |
Where are you hosting it? |
It runs on a virtual private server as docker container. |
Hello, I am using version 1.8 and also encountering this problem, how can I solve it? Thank you. 2020-05-19 10:28:48.521 ERROR 19974 --- [http-nio-8016-exec-17] i.g.i.ManagedChannelOrphanWrapper : *~*~*~ Channel ManagedChannelImpl{logId=4349, target=homegraph.googleapis.com} was not shutdown properly!!! ~*~*~*
Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
java.lang.RuntimeException: ManagedChannel allocation site
at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.<init>(ManagedChannelOrphanWrapper.java:103) ~[grpc-core-1.15.1.jar:1.15.1]
at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:53) ~[grpc-core-1.15.1.jar:1.15.1]
at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:44) ~[grpc-core-1.15.1.jar:1.15.1]
at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:410) ~[grpc-core-1.15.1.jar:1.15.1]
at com.google.actions.api.smarthome.SmartHomeApp.reportState(SmartHomeApp.kt:126) ~[actions-on-google-1.8.0.jar:na]
.... |
Hi @Fleker what is the solution for this error? I'm getting the same error with latest version 1.8 and hosting in google cloud: |
@proppy can you provide some additional guidance on this issue? |
Sorry for not seeing the @mention earlier. It seems that As pointed by @cbeaujoin in #30 (comment) and comments in the official gRPC sample for Java: A workaround could be for client to directly depends on the |
@Fleker Hi,how is this issue?it's a long time. |
This fixes the following errors from the logs: ``` Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true. ``` This fix was originally mentioned in actions-on-google#30 (comment)
@proppy proppy can you supply a demo?(A workaround could be for client to directly depends on the HomeGraph API Client Library for Java ) |
actionsApp.reportState(request); change as HomeGraphApiServiceGrpc.HomeGraphApiServiceBlockingStub stub = finally |
Is this error below because the grpc-core version is too low?
The text was updated successfully, but these errors were encountered: