ハリーは試してみた...しかし、振り上げるかあげないうちに、老人がひったくってしまった。
Harry gave it (the wand) a try, but no sooner had he raised it than the old man snatched it back.
I read this post on XかXないかのうちに with a translation of "within the time span where it is not even clear whether A had happened or not". This seems to neatly describe the situation in my case, but of course the grammar is slightly different.
Is there any difference in meaning/nuance/formality between XかXないうちに and XかXないかのうちに?