question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

An exception occurred while rendering the control

See original GitHub issue

Hello, I create new project with Prism Quickstart template and I can’t preview using Visual Studio Community for Mac. This is a error: error_zamarin It doesn’t work on Android as on iOS. The plugin is correctly initialized. This code is in AppDelegate.cs:

   public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
        {
            Rg.Plugins.Popup.Popup.Init();

            global::Xamarin.Forms.Forms.Init();
            global::FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            global::FFImageLoading.ImageService.Instance.Initialize(new FFImageLoading.Config.Configuration()
            {
                Logger = new Accesos.Services.DebugLogger()
            });

            // Code for starting up the Xamarin Test Cloud Agent
#if DEBUG
            Xamarin.Calabash.Start();
#endif
            LoadApplication(new App(new iOSInitializer()));

            return base.FinishedLaunching(uiApplication, launchOptions);
        }

and this code is in MainActivity.cs

 public class MainActivity : FormsAppCompatActivity
    {
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.SetFlags("FastRenderers_Experimental");
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            global::FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true);
            global::FFImageLoading.ImageService.Instance.Initialize(new FFImageLoading.Config.Configuration()
            {
                Logger = new Accesos.Services.DebugLogger()
            });

            LoadApplication(new App(new AndroidInitializer()));
        }
    }

I using Visual Studio Community for Mac 7.5.4 (build 3) and Xamarin Forms 3.1.0.637273. What could be the problem? Thanks a lot

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
natsnudasoftcommented, Jun 6, 2019

Figured out a workaround if you’re using prism. Add this prop to your App.xaml.cs: public bool IsDesignTime => PlatformInitializer == null; Then in RegisterTypes method bypass RegisterPopupNavigationService at design-time: protected override void RegisterTypes(IContainerRegistry containerRegistry) { if (!IsDesignTime) { containerRegistry.RegisterPopupNavigationService(); }

This workaround has stopped the issue for me. Thanks.

2reactions
rotorgamescommented, Nov 30, 2018

@karimElJed I confirmed this issue and I was going to fix it soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xamarin.Form Previewer : An Exception occurred while ...
Xamarin.Form Previewer : An Exception occurred while rendering the control ... I'm new in Xamarin. I want to learn about <Style> tag. I...
Read more >
An exception occurred while rendering the control
Whenever i want to use Xamarin.Forms Previewer i face this problem. Visual Studiowindows 10.0visual studio 2017 version 15.6.
Read more >
Solved: An error occured while rendering the report: "Unca...
Solved: Hi all, When I open Power BI Desktop, before I can do anything, it presents me with the error "an error occured...
Read more >
Solved: I am getting "An exception occured while rendering...
Solved: getting this "An exception occurred while rendering the web panel: com.pyxis.greenhopper.jira:greenhopper-epics-issue-web-panel.
Read more >
Solved: an error occurred while rendering the report
an error occurred while rendering the report · 1) Close all instances of Power BI Desktop · 2) Open file explorer and navigate...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found