austgl / robotium

Automatically exported from code.google.com/p/robotium
0 stars 0 forks source link

Input event injection permission denied. on honeycomb #133

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to run my tests on a honeycomb device (tested on android 3.0 and 
android 3.1, tablet+emulator)

The first test (method) runs correctly and all following tests gets this error:

    W/InputDispatcher(  136): Permission denied: injecting event from pid 1050 uid 10068 to window with input channel 40c2a6e0 com.android.launcher/com.android.launcher2.Launcher (server) owned by uid 10033
    W/WindowManager(  136): Input event injection permission denied.

I don't send any key or touch events in my tests.

When I delete the robotium lines in setUp() "solo = new Solo(...)" and 
tearDown() "solo.finalize()" the tests runs correctly.

Original issue reported on code.google.com by g.jjoe64 on 2 Aug 2011 at 8:05

GoogleCodeExporter commented 9 years ago
Is something blocking the other test cases? It seems as if the test cases are 
trying to interact with the launcher?

Original comment by renasr...@gmail.com on 3 Aug 2011 at 5:32

GoogleCodeExporter commented 9 years ago
I'm using the content provider in the setUp method. Maybe that's the source of 
the problem?

contentResolver = getInstrumentation().getContext().getContentResolver();
contentResolver.detete(...)

Original comment by g.jjoe64 on 3 Aug 2011 at 3:14

GoogleCodeExporter commented 9 years ago
It might be. It is hard to know why you are experiencing this problem without 
seeing your test cases. But an interaction is probably made outside of the 
application under test and that is why you are getting the error.  

Original comment by renasr...@gmail.com on 4 Aug 2011 at 5:32

GoogleCodeExporter commented 9 years ago
the test case doesn't be called. Even there is only a sleep the error comes and 
the test gets aborted.

my setUp is just doing this

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        contentResolver = getInstrumentation().getContext().getContentResolver();
        contentResolver.insert(ContentProvider.CONTENT_URI__FIXTURES, new ContentValues());
        Thread.sleep(2000);
        activity = getActivity();
        //solo = new Solo(getInstrumentation(), activity);
    }

remember that it works when Solo is commented out, and it also works WITH 
robotium on Smartphone Android 2.3

Original comment by g.jjoe64 on 4 Aug 2011 at 5:57

GoogleCodeExporter commented 9 years ago
Thanks for reporting this. A lot of focus for the next release will be on the 
3.x platforms. I will get back to you if I have problems reproducing this. 

Original comment by renasr...@gmail.com on 4 Aug 2011 at 6:04

GoogleCodeExporter commented 9 years ago

Original comment by renasr...@gmail.com on 4 Aug 2011 at 6:05

GoogleCodeExporter commented 9 years ago
This can not be reproduced. Please try with Robotium 2.5.

Original comment by renasr...@gmail.com on 31 Aug 2011 at 8:11

GoogleCodeExporter commented 9 years ago
I get the same error (Input event injection permission denied) when I try to 
clickOnButton from a pop-up (solo 2.5 installed)

Original comment by Cotoara....@gmail.com on 7 Oct 2011 at 6:46

GoogleCodeExporter commented 9 years ago
Hy - update: it happens when you try to clickOnButton from a pop-up and the 
keyboard is up, if you close the keyboard - it works ok

Original comment by Cotoara....@gmail.com on 7 Oct 2011 at 8:52

GoogleCodeExporter commented 9 years ago
not for me.

Original comment by g.jjoe64 on 7 Oct 2011 at 8:54

GoogleCodeExporter commented 9 years ago
It looks like "Input event injection permission denied." is unrelated to the 
issue. If you launch any application and then run tests, on "tearDown()" 
robotium will try to send "back" to each activity in the stack.

And sometimes last activity is not from application's task (in this case this 
is launcher's Home activity), android warns about this issue. In other words, 
Robotium tries to injects key stroke to completely unrelated activity.

And call be crazy, but when I add 'minHeight="50dp"' to button in xml layout, 
clickOnButton() works. If button is 49dp or less, clickOnButton() does not 
work. 

Original comment by ujn.g...@gmail.com on 17 Oct 2011 at 3:43

GoogleCodeExporter commented 9 years ago
I can confirm this problem with Robotium 2.5 on Android 3.2. I didn't have the 
problem for a while, and then it suddenly began to hit me. I don't know what 
prompted it, but I fixed it by moving the solo definition out of setUp()

Original comment by siddhu.w...@cloudreach.co.uk on 19 Oct 2011 at 7:55

GoogleCodeExporter commented 9 years ago
Having this issue to in a repeatable way, when calling on teardown

Original comment by ebr...@google.com on 16 May 2012 at 4:22