Webview out of scope

Hey guys does this make sense:

The code move in a webview when a card is clicked. It was written when live previewing on android and it worked. But when I try to create a new preview anywhere it says the action is used out of scope. If I comment those line, I can again generate the previews and then if I uncomment the action lines it works again on those previews.

As a designer I’m impressed by fuse, with a few days I learned a lot. But I’m just getting a hard time with few things like this one. Really thanks for all the support.

here is the code.

<App Theme="Basic">
     <Font File="assets/Roboto-Black.ttf" ux:Global="Black" />
    <Font File="assets/Roboto-Bold.ttf" ux:Global="Bold" /> 
    <Font File="assets/Roboto-Medium.ttf" ux:Global="Medium" />
    <Font File="assets/Roboto-Light.ttf" ux:Global="Light" /> 
    <Font File="assets/Roboto-Regular.ttf" ux:Global="Regular" />
    <FileImageSource ux:Global="back" File="assets/icn-back.png" />
    <FileImageSource ux:Global="logo" File="assets/logo-newsmonitor-white.png" />

    <JavaScript File="MainView.js" />     

    <WhileTrue ux:Name="showWEB">
            <Move Target="webView" X="-1500" Duration="1" Easing="ExponentialInOut" DurationBack="0.80" EasingBack="ExponentialInOut" />
            <Change webView.Alignment="Center" />
    </WhileTrue>

    <Text TextColor="#a94442" Value="{errorMessage}" Alignment="Center" />

    <DockPanel>

        <Page ux:Name="webView" X="1500" Height="100%" Width="100%" Alignment="Default">
            <DockPanel>
                <StatusBarBackground Dock="Top" />

                <DockPanel Dock="Top" Height="56" Color="#222">
                    <Rectangle Height="24" Width="24" Dock="Left" Margin="16, 0, 0, 0" Alignment="CenterLeft">
                        <Image Source="back" Color="#fff" />
                        <Clicked>
                            <Toggle Target="showWEB" /> 
                        </Clicked>
                    </Rectangle>
                    <Text Value="Newsmonitor" Font="Medium" FontSize="20" Alignment="CenterLeft" TextAlignment="Center" Padding="0" Margin="32, 0, 0, 0" TextColor="#FFF" />
                </DockPanel>

                <NativeViewHost>
                    <WebView ux:Name="web" Dock="Fill" Alignment="Default" Opacity="1" />
                </NativeViewHost>

                <BottomBarBackground Dock="Bottom" />
            </DockPanel>
        </Page>

        <Page ux:Name="newsList">
            <DockPanel>
                <StatusBarBackground Dock="Top" />

                <DockPanel Dock="Top" Height="56" Color="#222">
                    <Rectangle Height="18" Dock="Left" Margin="16, 0, 0, 0" Alignment="CenterLeft">
                        <Image Source="logo" Color="#fff" />
                    </Rectangle>
                    <DropShadow />
                </DockPanel>

                <ScrollView ClipToBounds="true" Background="#222" Padding="8, 0, 0, 8">
                    <StackPanel>
                        <ColumnLayout ColumnCount="2" />
                            <!-- json root = news clusters -->
                            <Each Items="{news}">
                                <StackPanel ux:Name="cards" Margin="0, 8, 8, 0" Width="100%" Opacity="1">

                                    <!-- articles array -->
                                    <Each Items="{articles}"> 
                                        <DockPanel Alignment="Bottom"> 
                                            <Clicked>
                                                 <LoadUrl TargetNode="web" Url="{url}" />
                                                <Toggle Target="showWEB" /> 
                                            </Clicked>

                                            <!-- image array -->
                                            <Each Items="{images}">
                                                <Rectangle Height="168" Width="100%" Dock="Left" Margin="0" Alignment="TopLeft" Color="#f4f4f4" CornerRadius="4, 4, 0, 0" ClipToBounds="true">
                                                    <ImageFill Url="{full_url.300x}" StretchMode="UniformToFill" StretchDirection="Both" />
                                                </Rectangle>    
                                            </Each>

                                        </DockPanel>

                                        <!-- title -->
                                        <Panel Alignment="Bottom" Color="#fff"> 
                                            <Text Value="{title}" TextWrapping="Wrap" TextAlignment="Left" FontSize="15" Margin="8, 8, 8, 0" Opacity="0.87" Alignment="Default" Dock="Fill" />
                                        </Panel>

                                    </Each>

                                    <!-- Cluster size = # publications-->
                                    <Rectangle Color="#fff" CornerRadius="0, 0, 4, 4">
                                        <WrapPanel Margin="8, 8, 0, 8"> 
                                            <Text Value="{clusterSize}" TextAlignment="Left" FontSize="11" Opacity="0.38" Alignment="BottomLeft" Dock="Fill" />
                                            <Text Value="Publicações" TextAlignment="Left" FontSize="11" Margin="4, 0, 0, 0" Opacity="0.38" Alignment="BottomLeft" Dock="Fill" /> 
                                        </WrapPanel>
                                    </Rectangle>

                                </StackPanel>
                            </Each>
                    </StackPanel>
                </ScrollView>
            </DockPanel>
        </Page>    

    </DockPanel>
</App>

Hi!

Can you please paste the exact error message you are getting, with as much information as possible?

Thanks!

Unexpected fatal error! Please report this to us. Build started: FullCompile Configuring Anima: E0000: web cannot be accessed from this scope ?: Error E0000: web cannot be accessed from this scope …/…/…/…/Users/helderaraujo/MyCode/Fuse/Anima/Anima.unoproj: E0000: File ‘/Users/helderaraujo/MyCode/Fuse/Anima/build/Android/Preview/cache/MainView.g.uno’ does not exist /Users/helderaraujo/MyCode/Fuse/Anima/Anima.unoproj(1,1): Error E0000: File ‘/Users/helderaraujo/MyCode/Fuse/Anima/build/Android/Preview/cache/MainView.g.uno’ does not exist …/…/…/…/Users/helderaraujo/MyCode/Fuse/Anima/Anima.unoproj: W0000: Unable to load cache: Could not find file “/Users/helderaraujo/MyCode/Fuse/Anima/build/Android/Preview/cache/AST51/mainview.g-47841a14”. /Users/helderaraujo/MyCode/Fuse/Anima/Anima.unoproj(1,1): Warning W0000: Unable to load cache: Could not find file “/Users/helderaraujo/MyCode/Fuse/Anima/build/Android/Preview/cache/AST51/mainview.g-47841a14”.

FATAL ERROR: Unhandled exception:

System.AggregateException: One or more errors occurred. —> System.IO.FileNotFoundException: Could not find file “/Users/helderaraujo/MyCode/Fuse/Anima/build/Android/Preview/cache/MainView.g.uno”. File name: ‘/Users/helderaraujo/MyCode/Fuse/Anima/build/Android/Preview/cache/MainView.g.uno’ at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in :0 at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, System.String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) [0x00000] in :0 at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool) at System.IO.StreamReader…ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) [0x00000] in :0 at System.IO.StreamReader…ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in :0 at System.IO.StreamReader…ctor (System.String path, Boolean detectEncodingFromByteOrderMarks) [0x00000] in :0 at System.IO.StreamReader…ctor (System.String path) [0x00000] in :0 at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string) at System.IO.File.ReadAllText (System.String path) [0x00000] in :0 at Uno.Compiler.Frontend.Cache.AstCache.Parse (Uno.Compiler.SourcePackage upk, System.String filename, System.Collections.Generic.List1 result) [0x00000] in /Users/outracks/buildAgent1/work/397767071b813b09/Source/Compiler/Uno.Compiler.Frontend/Cache/AstCache.cs:16 at Uno.Compiler.Frontend.Cache.CacheBase1[Uno.Compiler.Frontend.AST.AstNamespace].Load (Uno.Compiler.SourcePackage upk, System.String relative, System.Collections.Generic.List1 resultAsync) [0x00088] in /Users/outracks/buildAgent1/work/397767071b813b09/Source/Compiler/Uno.Compiler.Frontend/Cache/CacheBase.cs:52 at Uno.Compiler.Frontend.SourceReader+<ReadSourceFiles>c__AnonStorey1.<>m__0 () [0x00000] in /Users/outracks/buildAgent1/work/397767071b813b09/Source/Compiler/Uno.Compiler.Frontend/SourceReader.cs:186 at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0 at System.Threading.Tasks.Task.Execute () [0x00000] in <filename unknown>:0 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) [0x00000] in <filename unknown>:0 at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, Int32 millisecondsTimeout) [0x00000] in <filename unknown>:0 at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks) [0x00000] in <filename unknown>:0 at Uno.Compiler.Frontend.SourceReader.ReadSourceFiles () [0x0004d] in /Users/outracks/buildAgent1/work/397767071b813b09/Source/Compiler/Uno.Compiler.Frontend/SourceReader.cs:99 at Uno.Compiler.Core.CompilerObject.Load () [0x00000] in <filename unknown>:0 at Uno.Build.ProjectBuilder.Build (Uno.ProjectFormat.Project project, Uno.Build.BuildTarget target, Uno.Build.BuildOptions options) [0x00000] in <filename unknown>:0 ---> (Inner Exception #0) System.IO.FileNotFoundException: Could not find file "/Users/helderaraujo/MyCode/Fuse/Anima/build/Android/Preview/cache/MainView.g.uno". File name: '/Users/helderaraujo/MyCode/Fuse/Anima/build/Android/Preview/cache/MainView.g.uno' at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, System.String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool) at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) [0x00000] in <filename unknown>:0 at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in <filename unknown>:0 at System.IO.StreamReader..ctor (System.String path, Boolean detectEncodingFromByteOrderMarks) [0x00000] in <filename unknown>:0 at System.IO.StreamReader..ctor (System.String path) [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string) at System.IO.File.ReadAllText (System.String path) [0x00000] in <filename unknown>:0 at Uno.Compiler.Frontend.Cache.AstCache.Parse (Uno.Compiler.SourcePackage upk, System.String filename, System.Collections.Generic.List1 result) [0x00000] in /Users/outracks/buildAgent1/work/397767071b813b09/Source/Compiler/Uno.Compiler.Frontend/Cache/AstCache.cs:16 at Uno.Compiler.Frontend.Cache.CacheBase1[Uno.Compiler.Frontend.AST.AstNamespace].Load (Uno.Compiler.SourcePackage upk, System.String relative, System.Collections.Generic.List1 resultAsync) [0x00088] in /Users/outracks/buildAgent1/work/397767071b813b09/Source/Compiler/Uno.Compiler.Frontend/Cache/CacheBase.cs:52 at Uno.Compiler.Frontend.SourceReader+cAnonStorey1.<>m0 () [0x00000] in /Users/outracks/buildAgent1/work/397767071b813b09/Source/Compiler/Uno.Compiler.Frontend/SourceReader.cs:186 at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in :0 at System.Threading.Tasks.Task.Execute () [0x00000] in :0 <—

?: FatalError I0074: Unhandled exception: One or more errors occurred. jdk was found. Checking if /usr/local/share/uno/SDKs/AndroidSDK exists. /usr/local/share/uno/SDKs/AndroidSDK was found. Checking if /usr/local/share/uno/SDKs/AndroidSDK/tools exists. /usr/local/share/uno/SDKs/AndroidSDK/tools was found. Checking if Android SDK is corrupt. Checking if all required Android components are installed. androidsdk was found. Checking if /usr/local/share/uno/SDKs/AndroidNDK/ndk-build exists. /usr/local/share/uno/SDKs/AndroidNDK/ndk-build was found. androidndk was found. Checking if /usr/local/share/uno/SDKs/Ant exists. /usr/local/share/uno/SDKs/Ant was found. Checking if Ant is corrupt ant was found. Build ended fuse: Failed to compile project

Woah, what a mess. Sorry about this.

Could you please share the project that causes this? Either upload here or on slack.

Yep.

Just sent you a private msg with the zip in slack.