locked
Universal app on Windows Phone 10 black screen

    Question

  • Hello,

    I received strange feedback that my application has some problems on Windows Phone 10. I can't test this because I don't have any Win10 devices. Can anyone check this app:
    https://www.windowsphone.com/en-us/store/app/instabullet/28cffcfa-4568-45e5-820d-fb761b408bdd?signin=true

    I have no idea where is the problem. After application starts it loads WebView with login page and on Win10 it is only black screen - at least one user has this problem with Lumia 635. Anyone had similiar problems? It is said that Universal app should work on Win10 if they work on Win 8.1.

    Saturday, March 28, 2015 9:17 AM

All replies

  • Hello,

    Windows 10 Technical Preview supports both Windows 8 store apps and Windows 8.1 universal apps. But as the name implies, it's still in "preview".

    The best way to inspect the issue is to install Windows 10 Technical Preview on a Hyper-V machine and test your app there. But, Windows Phone emulator runs on Hyper-V and running Hyper-V on a virtual machine in Hyper-V is a problem.

    If you could share more details and code for your start page, we can try to find if there is a compatibility issue.

    Saturday, March 28, 2015 1:29 PM
  • It's a simple page with WebView, frameworks used are Unity, MVVM light.
    XAML:

    <Page
        x:Class="PushBulletClient.Views.WebAuthView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="using:PushBulletClient"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:utils="using:PushBulletClient.Utils"
        mc:Ignorable="d"
        Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
        DataContext="{Binding WebAuthViewModel, Source={StaticResource Locator}}"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:controls="using:PushBulletClient.Controls"
        xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
        xmlns:core="using:Microsoft.Xaml.Interactions.Core">
    
        <Grid x:Name="LayoutRoot" Background="{StaticResource BackgroundColor}">
    
            <Grid.ChildrenTransitions>
                <TransitionCollection>
                    <EntranceThemeTransition/>
                </TransitionCollection>
            </Grid.ChildrenTransitions>
    
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
    
            <!-- Title Panel -->
            <controls:HeaderControl Header="Login" IconSource="{StaticResource LogoImage}"/>
    
            <!--TODO: Content should be placed within the following grid-->
            <Grid  Grid.Row="1" x:Name="ContentRoot" Margin="19,9.5,19,0">
              <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
    
                <Grid x:Name="GridLoading" Visibility="{Binding State,
                    Converter={StaticResource StateIsEqualConverter},ConverterParameter=Loading}" 
                      Grid.Row="0" >
                    <StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center">
                        <ProgressBar HorizontalAlignment="Stretch" Background="{StaticResource BackgroundColor}" IsIndeterminate="True" />
                        <TextBlock HorizontalAlignment="Center" Text="Loading..." />
                    </StackPanel>
                </Grid>
    
                <Grid x:Name="GridDeclined" Visibility="{Binding State,
                    Converter={StaticResource StateIsEqualConverter},ConverterParameter=Declined}" 
                      Grid.Row="0" >
                  <StackPanel Orientation="Vertical">
                      <TextBlock Margin="0,0,0,20" Style="{StaticResource SubheaderTextBlockStyle}" Text="Declined"/>
                      <TextBlock TextWrapping="Wrap" Text="You must allow access to use Instabullet."/>
                      <Button Margin="0,10,0,0" Content="Back" Click="ButtonBack_OnClick"/>
                  </StackPanel>
                </Grid>
    
                <WebView Grid.Row="0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    x:Name="Navigator" 
                         NavigationStarting="Navigator_OnNavigationStarting"
                         Visibility="{Binding IsBrowserVisible, Converter={StaticResource BoolToVisibilityConverter}}"
                         >
                    
                    <interactivity:Interaction.Behaviors>
                        <core:EventTriggerBehavior EventName="NavigationStarting">
                            <core:InvokeCommandAction Command="{Binding NavigationStartingCommand}" 
                                                     InputConverter="{StaticResource StartingArgsToWebNavigationResultConverter}" />
                        </core:EventTriggerBehavior>
                        <core:EventTriggerBehavior EventName="NavigationCompleted">
                            <core:InvokeCommandAction Command="{Binding NavigationCompletedCommand}" 
                                                     InputConverter="{StaticResource CompletedArgsToWebNavigationResultConverter}" />
                        </core:EventTriggerBehavior>
                    </interactivity:Interaction.Behaviors>
                </WebView>
            </Grid>
        </Grid>
    </Page>

    CS

    using System;
    using Windows.Foundation;
    using Windows.Phone.UI.Input;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Navigation;
    using GalaSoft.MvvmLight;
    using PushBulletClient.Common;
    
    // The Basic Page item template is documented at http://go.microsoft.com/fwlink/?LinkID=390556
    using PushBulletClient.Contracts.ViewModels;
    using PushBulletClient.Contracts.Views;
    using PushBulletClient.Models;
    using PushBulletClient.Utils;
    using PushBulletClient.ViewModels;
    
    namespace PushBulletClient.Views
    {
        /// <summary>
        /// An empty page that can be used on its own or navigated to within a Frame.
        /// </summary>
        public sealed partial class WebAuthView : Page, IView
        {
            private NavigationHelper navigationHelper;
            private ObservableDictionary defaultViewModel = new ObservableDictionary();
          
    
    
    
    
            public WebAuthView()
            {
                this.InitializeComponent();
    
                this.navigationHelper = new NavigationHelper(this);
                this.navigationHelper.LoadState += NavigationHelper_LoadState;
                this.navigationHelper.SaveState += NavigationHelper_SaveState;
                this.Unloaded += WebAuthView_Unloaded;
                HardwareButtons.BackPressed += HardwareButtons_BackPressed;
                Navigator.Navigate(new Uri(Consts.AppUri));
            }
    
            void WebAuthView_Unloaded(object sender, RoutedEventArgs e)
            {
                HardwareButtons.BackPressed -= HardwareButtons_BackPressed;
            }
    
    
    
            /// <summary>
            /// Gets the <see cref="NavigationHelper"/> associated with this <see cref="Page"/>.
            /// </summary>
            public NavigationHelper NavigationHelper
            {
                get { return this.navigationHelper; }
            }
    
            /// <summary>
            /// Gets the view model for this <see cref="Page"/>.
            /// This can be changed to a strongly typed view model.
            /// </summary>
            public ObservableDictionary DefaultViewModel
            {
                get { return this.defaultViewModel; }
            }
    
            /// <summary>
            /// Populates the page with content passed during navigation.  Any saved state is also
            /// provided when recreating a page from a prior session.
            /// </summary>
            /// <param name="sender">
            /// The source of the event; typically <see cref="NavigationHelper"/>
            /// </param>
            /// <param name="e">Event data that provides both the navigation parameter passed to
            /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
            /// a dictionary of state preserved by this page during an earlier
            /// session.  The state will be null the first time a page is visited.</param>
            private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
            {
            }
    
            /// <summary>
            /// Preserves state associated with this page in case the application is suspended or the
            /// page is discarded from the navigation cache.  Values must conform to the serialization
            /// requirements of <see cref="SuspensionManager.SessionState"/>.
            /// </summary>
            /// <param name="sender">The source of the event; typically <see cref="NavigationHelper"/></param>
            /// <param name="e">Event data that provides an empty dictionary to be populated with
            /// serializable state.</param>
            private void NavigationHelper_SaveState(object sender, SaveStateEventArgs e)
            {
            }
    
            #region NavigationHelper registration
    
            /// <summary>
            /// The methods provided in this section are simply used to allow
            /// NavigationHelper to respond to the page's navigation methods.
            /// <para>
            /// Page specific logic should be placed in event handlers for the  
            /// <see cref="NavigationHelper.LoadState"/>
            /// and <see cref="NavigationHelper.SaveState"/>.
            /// The navigation parameter is available in the LoadState method 
            /// in addition to page state preserved during an earlier session.
            /// </para>
            /// </summary>
            /// <param name="e">Provides data for navigation methods and event
            /// handlers that cannot cancel the navigation request.</param>
            protected override void OnNavigatedTo(NavigationEventArgs e)
            {
                Navigator.Refresh();
                this.navigationHelper.OnNavigatedTo(e);
            }
    
            protected override void OnNavigatedFrom(NavigationEventArgs e)
            {
                this.navigationHelper.OnNavigatedFrom(e);
            }
    
            #endregion
    
            public ViewModelBase ViewModel
            {
                get { return this.DataContext as ViewModelBase; }
            }
            private void HardwareButtons_BackPressed(object sender, BackPressedEventArgs e)
            {
    
                if (Navigator.CanGoBack)
                {
                    Navigator.GoBack();
                    e.Handled = true;
                }
              
            }
    
    
            private void Navigator_OnNavigationStarting(WebView sender, WebViewNavigationStartingEventArgs args)
            {
                if (args.Uri.AbsolutePath.Contains("blank"))
                {
                    Navigator.Navigate(new Uri(Consts.AppUri));
                }
            }
    
            private void ButtonBack_OnClick(object sender, RoutedEventArgs e)
            {
                Navigator.Navigate(new Uri(Consts.AppUri));
            }
        }
    }
    There is also logic in ViewModel which doesn't contain any specific logic. 

    Monday, March 30, 2015 6:50 AM
  • Any ideas?
    Friday, April 3, 2015 6:08 AM
  • Taking this offline...
    Thursday, April 9, 2015 12:19 PM