title: Unable to decode an event from the watch stream: stream error: stream ID 3; INTERNAL_ERROR
body: <p>I want to listen for add events that are deployments within my cluster,I use the client-go Watch Api,It works well at first, but after a short period of time, it will report an error.</p>
  
  <p>I have tried two API ways to listen</p>
  
  <p>the one way:</p>
  
  <pre class="lang-golang prettyprint-override"><code>func startWatchDeployment(clientSet *kubernetes.Clientset){
      defer func() {
          err := recover()
          if err != nil {
              fmt.Println(err)
          }
      }()
  
      Log.Info("正在监听deployment...")
      count := 0
      deploymentsClient := clientSet.AppsV1beta1().Deployments(metav1.NamespaceAll)
      list,_ := deploymentsClient.List(metav1.ListOptions{})
      items := list.Items
      w, _ := deploymentsClient.Watch(metav1.ListOptions{})
      for {
          select {
              case e, _ := &lt;-w.ResultChan():
                  Log.Infof("162: %s",e)
                  if e.Type == watch.Added || e.Type == watch.Deleted{
                      if count != len(items){
                          count += 1
                      }else{
                          // go的reflect获取运行时的struct
                          nname := e.Object.(*v1beta1.Deployment).Namespace
                          if r, _ := regexp.Compile("^(p|u|user)-");nname != "default" &amp;&amp; nname != "cattle-system" &amp;&amp;
                              nname != "kube-system" &amp;&amp; nname != "dsky-system" &amp;&amp;
                              nname != "kube-public" &amp;&amp; nname != "local" &amp;&amp; nname != "tools" &amp;&amp; !r.MatchString(nname) {
                              data := make(map[string]interface{},1)
                              data["type"] = e.Type
                              data["name"] = e.Object.(*v1beta1.Deployment).Name
                              data["namespace"] = e.Object.(*v1beta1.Deployment).Namespace
                              watchChannel &lt;- data
                          }
                      }
                  }
          }
      }
  }
  </code></pre>
  
  <p>the other way:</p>
  
  <pre class="lang-golang prettyprint-override"><code>func startWatchDp(clientSet *kubernetes.Clientset){
      watchlist := cache.NewListWatchFromClient(
          clientSet.AppsV1().RESTClient(),
          "deployments",
          metav1.NamespaceAll,
          fields.Everything())
  
      _, controller := cache.NewInformer(
          watchlist,
          &amp;v13.Deployment{},
          time.Millisecond*100,
          cache.ResourceEventHandlerFuncs{
              AddFunc: func(obj interface{}) {
                  watchChannel &lt;- 1
                  //fmt.Println(obj)
              },
              DeleteFunc: func(obj interface{}) {
                  watchChannel &lt;- 1
              },
          },
      )
  
      stop := make(chan struct{})
      go controller.Run(stop)
  
      for {
          time.Sleep(10 * time.Second)
      }
  }
  </code></pre>
  
  <p>Here is my result:</p>
  
  <pre class="lang-sh prettyprint-override"><code>E0219 15:20:02.274210   19272 streamwatcher.go:109] Unable to decode an event from the watch stream: stream error: stream ID 3; INTERNAL_ERROR
  time="2019-02-19T15:20:02+08:00" level=info msg="162: { &lt;nil&gt;}"
  time="2019-02-19T15:20:02+08:00" level=info msg="162: { &lt;nil&gt;}"
  time="2019-02-19T15:20:02+08:00" level=info msg="162: { &lt;nil&gt;}"
  time="2019-02-19T15:20:02+08:00" level=info msg="162: { &lt;nil&gt;}"
  time="2019-02-19T15:20:02+08:00" level=info msg="162: { &lt;nil&gt;}"
  </code></pre>
  
  <p>How can I fix it?Please help!Thanks</p>