Skip to content

DevServer not able to connect on new Android targeting app #102

Closed as not planned

Description

@DevTKSS

Current behavior

  1. at very first build AND after producing the small repro => deleted .vs folder at root and all bin and obj folders for this I am welcomed in my new created Uno app.... 🎺 🥁 with a Black screen 🙄

    Image
  2. then click on the emulator "Power" button imagining that this would exit the device, 🎉
    the emulator decides to just end the black screen:

    Image
  3. Selecting now the Uno Logo -> my uno app from template on the right bottom of the emulator screen makes the app start with this screen:

    Image
  4. clicking on the dev server icon (recognize that the hot design flame is missing here!)

    Image - at this time I had other vs2022 instances open, but none of them with that app
  5. Now as mentioned, after producing the repro, I "just" started again, got greeted with the same black screen but after doing step 2-4 again, now the HD toolbar has the flame icon added, but dev server is still out of order:

    Image - closed the other instances of vs2022 as well
  6. Now I clicked on "Login" expecting already there might be more surprises on hand and...

    Image

    Confused about that unexpected advertisement, I clicked on the x on top of the side navigation to exit the emulator maybe with that

  7. Started debugging session again (after repro! before this the re-start did just show the dev server absent!) dev server was able to connect? No Black screen?

    Image

    after-repro-restart.txt

    • at the time the other instances of vs2022 were open, that black screen did show up exactly the same just took some longer time to start up, but I did not use the emulator target more than once before and that has been a month or so ago

PS:
(now its getting even more annoing)
8. now I exectuted dotnet tool install -g Uno.Check and as it told me its installed (sometimes it only updates if I use install command) used the update command as well, same result, so there is no newer version as yesterday (before 6.1.23 sdk)
9. runned uno-check which found the newer version of uno sdk, installed that (vs2022 still open)
10. VS2022 > Manage Extensions > Installed > clicked on "update Uno Extension" after written the version down below here
11. it installed as normal the new version after me closing the IDE => now its 6.1.20.20 of the extension
12. deleted meanwhile again the obj, bin and .vs folder to see if that new version might do the trick
13. Hopefully opened vs2022 again with the sln from before
14. let it restore until it stated "ready" in the Process Bottom bar
15. waited primary because I were hoping somebody would have fixed the banner "update to newer uno version!" I knowed from 6.0.96 release to be existing, just never seen any other number in it
16. as that did not appear, I set the uno version in the global.json file to the latest stable Uno.Sdk version

Image

and got the next F*** error message?😠

[ERROR][22:03:42.73] GlobalJsonObserver: Error reading global.json: Der Prozess kann nicht auf die Datei "C:\Users\Sonja\source\sample apps\UnoApp2\global.json" zugreifen, da sie von einem anderen Prozess verwendet wird.

Please team 😩 would somone please tell me, that I am not just the only person which constantly finds issues like beeing a magnet for them??? I JUST want to develop my app 🙄

Expected behavior

  • not showing a red icon on devserver?
  • show me that I would need to install the extension?
  • not requiring restart the app, to show no black screen?
  • should not have conflict with multiple vs2022 instances running?

Which tool(s) are affected?

Hot Design®, Hot Reload

How to reproduce it (as minimally and precisely as possible)

attached the project where it happens:
UnoApp2-DevServer-out-of-order.zip
(includes the console output file)

Android Pixel 7 (Android 15.0 - API 35) emulator is using this config files:

device config.zip

Workaround

dont know... pure guessing, but:

  1. not use android target?
  2. not expect first build to show the app correctly?
  3. get familiar with restart to get a connecting dev-server?

Renderer

  • Skia
  • Native

Affected platforms

No response

Uno.Sdk version

6.0.146

IDE used

Visual Studio 2022

IDE version

17.14.9

Uno Platform Extension version

6.0.58.58

Relevant plugins

No response

Anything else we need to know?

did I miss some detail in the docs about you are advertising other providers? dont know how to act with that "networksolutions.com" and as the uno docs for Web auth are... incomplete? That does also not tell me anything to do with that. should we use that? if so, how? I mean, some information could be great 👍

Activity

  1. added
    triage/untriaged
    on Jul 18, 2025
  2. jeromelaban commented on Jul 21, 2025

    @jeromelaban
    Member

    not showing a red icon on devserver?

    We'll need more information about that one. Logs from the app and logs from the extension in VS from the "Uno Platform" output window. Without those logs, we cannot help.

    show me that I would need to install the extension?

    I don't understand this particular comment. Do you want VS to mention that the uno platform extension should be installed? If that's the case, we had that feature a while back but it broke frequently in VS so we removed it.

    not requiring restart the app, to show no black screen?

    This looks like an issue with your simulator more than anything else. The log that you are providing does not show any issue or exceptions. A more consistent repro would help.

    should not have conflict with multiple vs2022 instances running?

    Opening two instances of VS (or any other IDE) on the same solution is not supported at this time. VS also has a lot of issues with that scenario even without uno (there are race conditions in the bin and obj folders). This could also explain the global.json error you saw.

    I tested your app and it's starting fine with the dev server enabled.

    did I miss some detail in the docs about you are advertising other providers? dont know how to act with that "networksolutions.com" and as the uno docs for Web auth are... incomplete? That does also not tell me anything to do with that. should we use that? if so, how? I mean, some information could be great 👍

    This seems to be another issue, make sure to open for this.

    1. waited primary because I were hoping somebody would have fixed the banner "update to newer uno version!" I knowed from 6.0.96 release to be existing, just never seen any other number in it

    This number does not update instantly, we generally wait a bit before notifying all users in order to ensure that there are no obvious blockers that developers would hit.

  3. added theissue type on Jul 21, 2025
  4. DevTKSS commented on Jul 21, 2025

    @DevTKSS
    Author

    not showing a red icon on devserver?

    We'll need more information about that one. Logs from the app and logs from the extension in VS from the "Uno Platform" output window. Without those logs, we cannot help.

    will re do the steps as above set logs to detailed and add them 👍

    show me that I would need to install the extension?

    I don't understand this particular comment. Do you want VS to mention that the uno platform extension should be installed? If that's the case, we had that feature a while back but it broke frequently in VS so we removed it.

    It would make sense to get this prompt, if I would not have the extension installed. I do have it installed, so it should not pop up in my opinion.

    not requiring restart the app, to show no black screen?

    This looks like an issue with your simulator more than anything else. The log that you are providing does not show any issue or exceptions. A more consistent repro would help.

    Meaning the uno platform log files from above or different ones? if different ones, let me know, where to get them please.

    should not have conflict with multiple vs2022 instances running?

    Opening two instances of VS (or any other IDE) on the same solution is not supported at this time. VS also has a lot of issues with that scenario even without uno (there are race conditions in the bin and obj folders). This could also explain the global.json error you saw.
    I tested your app and it's starting fine with the dev server enabled.

    It has not be the same solution, it were two different ones.

    did I miss some detail in the docs about you are advertising other providers? dont know how to act with that "networksolutions.com" and as the uno docs for Web auth are... incomplete? That does also not tell me anything to do with that. should we use that? if so, how? I mean, some information could be great 👍

    This seems to be another issue, make sure to open for this.

    alright, so for the incomplete auth docs for example I did add a comment on the Feedback I send you over here: unoplatform/uno.extensions#2853 because I am still hoping that the issues I already opened for those would get some notice of the team at some time at the future, but as some of the there listed issues (also to the others which are blocking or limiting me on the use of Uno apps) are already months old, I am loosing slowly hope that this will be soon approached. 👀 hoped that at least a feedback to look at would be awakening interest of the team. Would not see that I can do much more :(

    1. waited primary because I were hoping somebody would have fixed the banner "update to newer uno version!" I knowed from 6.0.96 release to be existing, just never seen any other number in it

    This number does not update instantly, we generally wait a bit before notifying all users in order to ensure that there are no obvious blockers that developers would hit.

    @jeromelaban thats a bit funny as we are now already at the 6.1.23 release 🤔 😅 so seems like this is only meant to tell us to update to next major, or what should I understand from this? the 6.0.146 release has been some months now and the banner did not ever show up for telling about this. so would be interested in the "wait a bit" time span that is meaning?

  5. DevTKSS commented on Jul 21, 2025

    @DevTKSS
    Author

    @jeromelaban @kazo0

    sorry for not seperating all issues I got now (after the wizard decided that vaccation is over) but honestly, that has now gotten so much that I am too tired to cut the included repro video and so on. Feel free to do so.
    I seperated the logs (Debug + Uno Platform Output) per build, the logs are seperated to

    • logs.zip => this is including log files
    • uno-check-[...].zip (obmitted guid for brevity) => which includes all txt files like uno-check runs from that evening (potentially could also include logs from the Wizard issue, dont know)
    • temp-folders-with-maybe-logs.zip => gathered all folders from temp with the timestamps from this evening, dont know if you find anything helpful there to investigate

    And beside of course the repro made app (vs, bin, obj) folders deleted) a Readme with little information about the output files

    https://technischekonstruktion-my.sharepoint.com/:u:/g/personal/info_technische-konstruktion_com/EUgNc6hEgMdIss7wL_6C-F0BnSEzd5NsLWyowj81YRpUbw?e=YDO1U6

    I recommend watching the video (mkv) to follow what happened, that would be horrible too much work to write that all down again sorry. I also have in this the WindowIcon Issue you might see on our discord server, so if you miss any logs (mine did not fail build on this while "not supported on xy platform" only Android supported???) the contained logs could have some information to look into maybe.

  6. DevTKSS commented on Jul 21, 2025

    @DevTKSS
    Author

    I think, that the devserver on android is not available, will be caused from the exiting debugger, which you can see in the video. so using then the "Back" arrow on the emulator which opened the browser in the device to that suspicious "my.domain.com" or similar the browser does close instead of navigating back to our running app which initially shown the devserver beeing connected. if you do then not use the Rectangle button on the emulator, than tap on the app icon again, that will open a new instance of it which is showing the devserver red (first image above) and no hd flame. closing this 2nd instance then and going back to the 1st, you ll see the splash screen again and now the devserver is not longer able to connect.

    But hey, congratulations, seems like you have more hd message boxes than I known so far (the one with the extension shown above would I have known!) counting now 3 different ones I know of beeing existing 😆 😢
    I would rather dont know any of them 😅

  7. jeromelaban commented on Jul 21, 2025

    @jeromelaban
    Member

    Thanks for the video, this helps.

    A few comments:

    • The "networksolutions.com" is the default value for the UseAuthentication extension. See there to configure it.
    • It's expected that the devserver won't connect when not running with the debugger from VS 2022 for android and iOS. See here for the support matrix.
    • It's also expected that an app run directly from the device (without the debugger attached) which has been built with a previous instance of VS, or for which VS has been closed, to fail to connect. This will show the three gray dots in the app and eventually fail to connect. Start the app from VS to get it connecting again.
    • At the mark 18:27, on wasm, the breakpoint his for the website you're opening in separate window, this is unrelated to uno (see the thread context which says networksolutions.com/...). When auth is configured to the right endpoints, this error will go away.
    • "Login" is using WebAuthenticationBroker which is not implemented for desktop.
  8. DevTKSS commented on Jul 21, 2025

    @DevTKSS
    Author

    @jeromelaban but you did remark, that I did at no time attempt to run the emulator without the debugger attached do you?

    So I would definitely not expect, this to suddenly to quit its one and only job when I start my app with android target in debug mode.

    So please tell me, at which point of this, my try to run my app in debug on android just with that very normal button I also use for any other target just fine, would fit your nice matrix?

    In my opinion I would like to return the question, why do we get a setup for appsettings.development.json included in our new app (I could understand that sample Provider if it would be in the appsettings.json without the development in-between!) that makes our app on e.g. android emulator debug executed break debug? Because that makes no sense in my opinion. It would make lot more sense if this development settings if we choosen the server project in our config, would actually use exactly this and! that would be in my very own opinion be the absolutly perfect point where a professional developer (which I would assume the uno team devs to be ❤️ because you are doing the chefs app and the bootstrapper package this server does use and our wasm target 👍) could add exactly this login UI I am currently absolutely failing to get set up on my other app I mentioned on discord, as Sample to this server. That sample code would that way not just solve any external "yeah thats a problem we do not have in our hand thats coming from the web auth provider url" I do now get for that android emulator issue for example, but also could greatly work out for the other platforms!

    Best would be if this would be then https and minimal api just like the asp net core docs team is currently updating for doing this with blazor.

    I hope someone will consider this for the future😔

  9. DevTKSS commented on Jul 21, 2025

    @DevTKSS
    Author

    "Login" is using WebAuthenticationBroker which is not implemented for desktop.

    Okay, but wouldnt it then not make sense to show this directly in the wizard? Pure guessing 🙃 Disabled just like the msal auth? Just with the difference that this MSAL is disabled for ALL platforms agains what it tells us and the webauth would be disabled just for desktop 🤷 or if you choose web auth before, it should maybe give a warning and disable Desktop target maybe 😅🤷 don't know I am sure you would have ideas how to do this.

    But without this, just letting the user fail on executing it, is from my POV the worst way to do it. Of course they can read about this maybe in the docs! (Okay this would preset the docs would be complete and good linked for this😅) But I as user would maybe prefer to be told about this not beeing optional before or have a workaround implementation in my new app without beeing required to read the whole documentation.
    And just a idea to ease the popping up issues team would have to lookup of those who dont want or do read the whole docs ;) maybe you could find a way to add nice little ( i ) help/lookup link areas/buttons to each of the wizard buttons of the features that could redirect us directly to thhose overview docs where you can tell us thats not available or whatever else we should know of🙃

    Or if you have any other setup for this auth on desktop, I remember you mentioning the platform conditionals #if that could be used in this case maybe?
    I would guess that webauth could potentially be useful for implementing e.g. cookies which is not really beeing told how to use in the docs only one sample code block that is not what I would see as full documentation 😅 just waiting for you to tell me that this is also not usable for desktop?🙃 Or that android requires us to use oidc?

  10. jeromelaban commented on Jul 22, 2025

    @jeromelaban
    Member

    @jeromelaban but you did remark, that I did at no time attempt to run the emulator without the debugger attached do you?
    So please tell me, at which point of this, my try to run my app in debug on android just with that very normal button I also use for any other target just fine, would fit your nice matrix?

    There is no need to be snarky, we're all trying to get this platform evolving, one bug at a time.

    You'll probably have noticed that the web flow makes the app disconnect from the debugger, because android terminates the app. This is a behavior from Android 35 that we have no fix for at this time. The workaround is to use an android 34 emulator instead. This was an internal bug we've noticed internally a while back, it did not surface publicly: unoplatform/uno#21101.

    In my opinion I would like to return the question, why do we get a setup for appsettings.development.json included in our new app (I could understand that sample Provider if it would be in the appsettings.json without the development in-between!) that makes our app on e.g. android emulator debug executed break debug? Because that makes no sense in my opinion. It would make lot more sense if this development settings if we choosen the server project in our config, would actually use exactly this and! that would be in my very own opinion be the absolutly perfect point where a professional developer (which I would assume the uno team devs to be ❤️ because you are doing the chefs app and the bootstrapper package this server does use and our wasm target 👍) could add exactly this login UI I am currently absolutely failing to get set up on my other app I mentioned on discord, as Sample to this server. That sample code would that way not just solve any external "yeah thats a problem we do not have in our hand thats coming from the web auth provider url" I do now get for that android emulator issue for example, but also could greatly work out for the other platforms!

    I'm not sure to understand what the issue is here. Can you point to a specific problem?

    Okay, but wouldnt it then not make sense to show this directly in the wizard? Pure guessing 🙃 Disabled just like the msal auth? Just with the difference that this MSAL is disabled for ALL platforms agains what it tells us and the webauth would be disabled just for desktop 🤷 or if you choose web auth before, it should maybe give a warning and disable Desktop target maybe 😅🤷 don't know I am sure you would have ideas how to do this.

    Yes, that is true and it is a bug. This option should not be enabled in this case, if the desktop target is selected, in the same way other options are disabled for similar reasons. Let's track in unoplatform/uno.templates#1665.

  11. DevTKSS commented on Jul 26, 2025

    @DevTKSS
    Author

    @jeromelaban the general auth setup on the provided server project was requested here before:

    And for how to do the UI part of if in uno solutions with for example a WebAssembly running on that server (server startup project) instead of using blazor, I think this question I added here:

    Might potentially enable to understand the missing parts of setting this up as user better.

    I dont know much or better anything about whats done in that server package of uno, so I would assume if we want to send the user of our android emulator app to a web ui just like that external non-uno provider the web auth template provides us as url, that would possibly need a... Web assembly project running on such a server, beeing closly connected (same origin I think thats called if its e.g. both on server.mydomain.com running?)
    So if I would have my android user send to my now https wasm ui, type in his login etc, that should do fine as own web ui.

    If that's understand correctly from my side (?) then it would be a cool idea if that would be a option to not have the exception causing us need to press continue at all because we would call such own server ui instead🤔

    Maybe you can tell if that is a reality realizable idea at some point while, yes, its not implemented at this point now like this.

  12. DevTKSS commented on Sep 26, 2025

    @DevTKSS
    Author

    @jeromelaban some issue solving ideas to check maybe, since I not noticed those information beeing already there:

    • HD/Hot Reload Docs or the general ones should tell us in a trouble shooting about the limitation and known bug source of multiple instances of our app and the IDE in general 👀

    • Android target specific docs should tell us about the known bug you mentioned about the emulator version with telling us jow to workaround this so we can keep developing our app at least 👍

    • Web Auth Docs and if the others have such sample URL, those too, should have a note about this should be replaced by any valid URL so problems like I had with it would not cause headaches for the user, because normally I as Uno.Sdk Consumer would assume that especially if I get some presets in the Templates you ship, I would not have to be careful to experience my new created app as-is. Like given case, you did now tell me, this issue thrown of this url is known but not on uno hands, I would be thankful if you could check if you maybe find some alternative url to put in there which does not have a problem (maybe to be ensured by a test in the templates repo added if its possible to catch this?). This would be the best solution also for user/consumer experience and maybe the smallest effort? ❤️


    • eventually (as tryed to suggest before) you could check if we choosen on the wizard to include the Server project and we are not serving on the server project actually like we would have by running everything except wasm I think 🤔 (maybe by TargetFramework Conditionals?) and add some small Auth UI just there on the server project we did already choose to have and wire up our client app with the server? There are issues or feature requests existing for auth code to be added in the Server project, so maybe this could be considered to get done alongside with this?🚀 The OpenIdDict just for example would seem to indeed have a great integration for this setup 😁 their sample is doing this. Just everytime I tryed using that with the Uno.Wasm.Bootstrapper.Server package our server apps are using by default, that did not work and I myself would not know how to set this up. That's why I am still hoping that someone else is capable of☺️
  13. DevTKSS commented on Sep 26, 2025

    @DevTKSS
    Author

    I think those first three steps to be at least somewhere filed and enqueued to get tackled, we could close this issue.
    Seems like I just managed (again 😅) to run into a huge collection of problems that are known but not good/directly find able linked in the uno docs😅 not the greatest talent, but if there would ever be created a job description in the world like "bug detector" I would be the best candidate for it just from my experience with software so far 🤣🤪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty/tbdtool/Hot Design®tool/Hot Reloadtriage/untriaged

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions