Private Spaces won't load Apps
Tried a Gradio app and a Docker Jupyter notebook, neither would load properly in Private Space but worked in Public Space. I am totally new to HuggingFace Spaces. What am I missing?I duplicatedgradio/chatinterface_streaming_echointo a Private Space and chose the Free compute, and the interface won’t load. The "Building… "icon goes away and it says “Running” but the interface just stays blank.I duplicated that repo into my Public Space with the Free compute and it immediately loaded.Docker Jupyter shows a huggingface 404 in the Private space but works in Public space.What do I need to do to get it working in my Private Space?  Is it a setting? Is it common to all Private Spaces?image3000×1166 108 KB
2024-10-05T04:47:50Z
No special changes are required to make Spaces work in Private, unless it is in conjunction with an external application or something.Just click on thethree vertical dots, selectSettings, and pressMake private.This will make it a Private space.If you pressMake public, it will become a Public space.If it does not work, then you have another problem that has nothing to do with Private.P.S.huggingface.cochatinterface_streaming_echo - a Hugging Face Space by gradioDiscover amazing ML apps made by the communityThis worked fine when I duplicated it in Private. Maybe you just had a bad build. Sometimes there are glitches.Also, Spaces and models that are set to Private are visible as 404 to everyone but you, unless you use a token. That’s what this feature is for.
2024-10-05T19:40:59Z
Starting  Spaces in Public and going Private- good idea!  But, does that have any drawbacks security-wise?  I am very interested in theSOCS compliancethat huggingface hub spaces offers, does that lose anything security-wise?Back to the Private Spaces not working:I once again duplicatedgradio/chatinterface_streaming_echointo Private and it still failed to load (as a blank App page)!  However, When I go to the three dots > Settings andmake that private space Public(same repo!),it WORKS.  What is going on??image2215×1027 225 KBI am running on Chrome 129, disabled all my blockers, and even tried on both my network and a cell phone hotspot (because I have adblock on the router firewall, too).The Build Log looks fine to me…Private Space build (first time, did not work, did not load app):===== Build Queued at 2024-10-05 19:29:40 / Commit SHA: 00a8c4a =====

--> FROM docker.io/library/python:3.10@sha256:aaacc373f21abcbc67a22d203dab7fb797c016cc4c1daa7d2dec359dcbf4aea1
DONE 0.0s

--> RUN pip freeze > /tmp/freeze.txt
CACHED

--> RUN pip install --no-cache-dir pip==22.3.1 && 	pip install --no-cache-dir 	datasets 	"huggingface-hub>=0.19" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0"
CACHED

--> RUN apt-get update && apt-get install -y fakeroot &&     mv /usr/bin/apt-get /usr/bin/.apt-get &&     echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get $@' > /usr/bin/apt-get &&     chmod +x /usr/bin/apt-get && 	rm -rf /var/lib/apt/lists/* && 	useradd -m -u 1000 user
CACHED

--> RUN apt-get update && apt-get install -y 	git 	git-lfs 	ffmpeg 	libsm6 	libxext6 	cmake 	rsync 	libgl1-mesa-glx 	&& rm -rf /var/lib/apt/lists/* 	&& git lfs install
CACHED

--> COPY --chown=1000:1000 --from=root / /
CACHED

--> WORKDIR /home/user/app
CACHED

--> RUN pip install --no-cache-dir 	gradio[oauth]==4.44.1 	"uvicorn>=0.14.0" 	spaces
CACHED

--> COPY --link --chown=1000 ./ /home/user/app
DONE 0.0s

--> COPY --from=pipfreeze --link --chown=1000 /tmp/freeze.txt /tmp/freeze.txt
DONE 0.0s

--> Pushing image
DONE 0.9s

--> Exporting cache
DONE 0.7sMaking that Private space Public, build log (this worked):===== Build Queued at 2024-10-05 19:36:45 / Commit SHA: 00a8c4a =====

--> FROM docker.io/library/python:3.10@sha256:aaacc373f21abcbc67a22d203dab7fb797c016cc4c1daa7d2dec359dcbf4aea1
DONE 0.0s

--> COPY --chown=1000:1000 --from=root / /
CACHED

--> RUN apt-get update && apt-get install -y fakeroot &&     mv /usr/bin/apt-get /usr/bin/.apt-get &&     echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get $@' > /usr/bin/apt-get &&     chmod +x /usr/bin/apt-get && 	rm -rf /var/lib/apt/lists/* && 	useradd -m -u 1000 user
CACHED

--> RUN apt-get update && apt-get install -y 	git 	git-lfs 	ffmpeg 	libsm6 	libxext6 	cmake 	rsync 	libgl1-mesa-glx 	&& rm -rf /var/lib/apt/lists/* 	&& git lfs install
CACHED

--> WORKDIR /home/user/app
CACHED

--> RUN pip install --no-cache-dir pip==22.3.1 && 	pip install --no-cache-dir 	datasets 	"huggingface-hub>=0.19" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0"
CACHED

--> RUN pip freeze > /tmp/freeze.txt
CACHED

--> RUN pip install --no-cache-dir 	gradio[oauth]==4.44.1 	"uvicorn>=0.14.0" 	spaces
CACHED

--> COPY --link --chown=1000 ./ /home/user/app
DONE 0.0s

--> COPY --from=pipfreeze --link --chown=1000 /tmp/freeze.txt /tmp/freeze.txt
DONE 0.0s

--> Pushing image
DONE 0.7s

--> Exporting cache
DONE 0.6s
2024-10-05T23:32:56Z
does that have any drawbacks security-wise?I don’t think any inconvenience will occur, except in the case of commercial problems if the code is open, or if you mistakenly put personal information in the code.The switch between Public and Private is just an example to isolate the problem, and it should work perfectly fine even if the code is directly duplicated in Private. In fact, it worked fine on my account.What is going on??I don’t know. I don’t know, but something is definitely wrong with your environment anyway.I too usually use Chrome as my primary tool for running Spaces. As for this space, even Firefox with ad blocker works. And if the demo doesn’t work, it shouldn’t work in Public either.Conceivably, we need to be logged in to our account to use Private Spaces, which HF is probably judging by cookies, sessions, or something like that.If you look at your Private space and don’t get a 404, then your login is working at least minimally well. But what if there was a case where this is the halfway point?But is there such a glitch nowadays? We’re probably fine with Private Browsing…@not-lainHave you ever heard of such a phenomenon where only executing Private Space on a browser causes an error? I can’t find any reports of it in my search.P.S.Maybe VPN issue?
2024-10-06T01:22:23Z
John6666:Conceivably, we need to be logged in to our account to use Private Spaces, which HF is probably judging by cookies, sessions, or something like that.Cookies–brilliant!  So, I run all my browsers in Strict Privacy mode withNO 3rd Party Cookies.  I was able to fix it by doing this:In Chrome I went toSettings > Privacy > Third-Party Cookies > Sites Allowed to use Third Party cookiesand added an exception for[*.]huggingface.co.So, apparently, when youDuplicate Spacedirectly in Private, it tries to create a third party cookie to enable the “App” window.  But allPublic spaces do not use third-party cookies?  And if you go Public → to Private space, the 3rd party cookie is also not required?? (Edit - I was always logged into my account, of course, and I continue to be logged in.)Makes me think there is something funny about Security when you go from Public → Private… But maybe that’s my tin foil hat getting too tight?Anyway, good call,@John6666. I’ll have more security-related Q’s in the future, but this gets me off and running!
2024-10-06T01:43:32Z
Maybe this has been added for security reasons since you can run anything in spaces, but i’m glad this has been resolved.
2024-10-06T02:28:05Z
Oh well. Anyway, if it works, it’s good.It’s easy for HF and us.BTW, too many video trolls and I won’t be able to flag anything for the next 9 hours. But it’s nighttime in the US…
2024-10-06T14:28:55Z
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.