# TCanvas fails in 6.36 with web-browser

**URL:** <https://root-forum.cern.ch/t/tcanvas-fails-in-6-36-with-web-browser/63754>\
**Category:** ROOT\
**Created:** [June 19, 2025, 12:27am UTC](https://root-forum.cern.ch/t/tcanvas-fails-in-6-36-with-web-browser/63754 "2025-06-19T00:27:02Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![preimer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@preimer](https://root-forum.cern.ch/u/preimer)\
**Post date:** [June 19, 2025, 5:03pm UTC](https://root-forum.cern.ch/t/tcanvas-fails-in-6-36-with-web-browser/63754/3 "2025-06-19T17:03:30Z")

</div>

Solution with a question:

Short answer:  
Using the option `--web` solves the problem (see transcript below)

```auto
root --web            
   ------------------------------------------------------------------
  | Welcome to ROOT 6.36.000 https://root.cern |
  | (c) 1995-2025, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosxarm64 on Jun 18 2025, 22:42:11 |
  | From tags/6-36-000@6-36-000 |
  | With Apple clang version 17.0.0 (clang-1700.0.13.5) |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------------

rootLogon
(int) 1
root [0] TCanvas c
Info in <THttpEngine::Create>: Starting HTTP server on port 127.0.0.1:9282
(TCanvas &) Name: c1 Title: c1
root [1] TH2D *my2d = new TH2D("my2d", "my2d", 100, 0, 1, 100, 0, 1)
(TH2D *) 0x12f00e800
root [2] my2d->Draw()
root [3] .q

```

_Question:_ If --web is the default, as I can see by it opening TBrowser correctly, why do I need to specify that option on the command line if I open TCanvas? I am puzzled by the difference in behavior between TBrowser and TCanvas in terms of the simple opening of a canvas. Not a problem, since I will just redefine my root alias to include --web, but curious?

Long answer:  
Following @couet’s reply, I looked at @linev’s post [\<TBrowser::TBrowser\>: The ROOT browser cannot run in batch mode - #3 by linev](https://root-forum.cern.ch/t/tbrowser-tbrowser-the-root-browser-cannot-run-in-batch-mode/51908/3). There I see that specifying a server and port with the --web=server:port option might be a useful idea. It worked somewhat, in that I had to open a browser (did not automatically appear) and go to the web site printed after the TCanvas call _before the TCanvas call timed out_. Then I could draw on that canvas.

```auto
root [0] TCanvas c
Info in <THttpEngine::Create>: Starting HTTP server on port 127.0.0.1:9898
New web window: http://localhost:9898/win1/?key=5a78e0ae-9c816620-0da8db97-4d460f9a-523e16fc-63f0b5ca-c252eac2-0249c657#52620503-0ac0503c-eb262a91-528834e2-4eb7f603-055ff6cf-f0aab3e3-3863227f
(TCanvas &) Name: c1 Title: c1

```

This prompted me to try it without specifying the server:port.

Paul

---

_[View the full topic](https://root-forum.cern.ch/t/tcanvas-fails-in-6-36-with-web-browser/63754)._
