Ghost duplicate text lines in Terminal on Android

Put it up on Issues…no response, but magically it disappeared an hour later. On all apps.

Coincidence…? Either way, it all works now.

First off…Environment
Adafruit ESP 8266
Samsung Note 8 (fails)
Apple iPhone 7+ (does not fail)
Android Version 8.0.0
Kernel Version: 4.4.78-14375742
Build Number:R16NW.N950USQS5CRJ3
Carrier: T-Mobile
Connection: Local WiFi Router
Blynk Server v0.5.4

This has been dogging me for a while. There are repeating lines in my terminal widget on my note 8. At first I thought that it wasn’t there, and then it was, and then it was gone. Searches indicate that others have complained about something like this back a couple of years. It fails reliably on the Note 8, but doesn’t appear at all on iOS.

Once I figured out how to find it, the behavior is totally reproducible and appears to have virtually nothing to do with the local code and everything to do with the widget itself on my Note 8.

The code really doesn’t matter so I built a bare bones sample using the terminal and a timer. Since this is currently running on an esp8266, it uses WiFi.

My test code:

//*************************************************************
#define BLYNK_PRINT Serial
#include <BlynkSimpleEsp8266.h>
//Auth token
char auth[] = "xxxxxxxx";
BlynkTimer timer;
// Attach serial terminal to Virtual Pin V1
WidgetTerminal terminal(V1);

void sendUptime(){
  //millis to Serial monitor
  Serial.print("[");
  Serial.print(millis());
  Serial.println("]");

  //millis to Blynk terminal widget
  terminal.print("[");
  terminal.print(millis());
  terminal.println("]");
  terminal.flush();
}

void setup()
{
  // Debug console
  Serial.begin(9600);
  delay(5000);
  //reconnect to cached valid WiFi connection
  Blynk.begin(auth, "","");
  // Clear the terminal content
  terminal.clear();
  // Print Blynk Software version to the Terminal Widget when
  terminal.print("Blynk v" BLYNK_VERSION);
  terminal.print(": Device started\n");
  terminal.print("-------------\n");
  terminal.flush();
  timer.setInterval(4000, sendUptime);
}

void loop()
{
  Blynk.run();
  timer.run();
}

Serial Terminal printout is as one would imagine:
Connect indication and then time hacks in milliseconds every 4 seconds

[5040] Connected to WiFi
[5040] IP: 10.0.1.16
[5040]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.5.4 on ESP-12

[5135] Connecting to blynk-cloud.com:80
[5328] Ready (ping: 58ms).
[9529]
[13529]
[17529]
[21529]
[25529]
[29529]
[33529]

Blynk on the Note 8 is a little different

Startup message is duplicated, as are the time hack lines.

What makes this hard to find is that if you then minimize the Blynk app on the phone and then re-maximize, the duplicates…simply disappear when the app is re-painted to the screen.

However, if you stop the app in the Blynk UI, the duplicates re-appear, but this time reordered as two complete sets of data:

If you again start the app in the UI, generally the duplicates will disappear again, although cycling back and forth between stop and start often looks good in the run mode, but sometime the two sets of duplicates re-appear even in the run mode.

Once the duplicates are eliminated and the run continues, subsequent data will again be duplicated and minimizing and maximizing the UI will eliminate them each time.

This seems to have something to do with the Terminal data buffer on the phone app, but without knowing the architecture I really cannot comment further. It is, however, totally reproducible on the Note 8, but again, never on iOS, at least on the iPhone 7+.

Thanks guys…it’s gone now.

First, all you did is create a duplicate topic for same exact issue, which we don’t like here, so I merged it back in with this one. It is all the same forum you know :stuck_out_tongue: and our discussion had been keeping it at the top anyhow :wink:

As for your “solution”… unless the developers fixed something, then ran to your home and installed the App secretly on your phone… yes, coincidence or something else done at your end… restarting/installing App? some other phone setting? solar flares? Much like other past reported terminal duplication issues, we may never know :thinking: another one for the x-files.

Irrespective of your sarcasm. I am not an idiot and I know how to develop and deploy code. You have no idea what is really behind these widgets.

I changed nothing. Not on the phone or on the platform. It failed consistently for days. All of a sudden it works reliably. I don’t believe in code fairies.

Enough already.

Good to know… Why, did someone call you such?

We do get that a lot here… No explanation, but suddenly something that was broken for one person just works… it has happened to me as well.

OK :wink:

TLDR/

blynk terminal has issues.

often sends duplicate or triplicate of terminal.prints

doubt it will ever be fixed.

1 Like

it’ll be back mate… don’t you worry about that!

Like a spicy burrito… hits some worse than others :rofl:

brilliant simile for the circumstances :wink:

Well, it appears to have been a problem in the past, was a problem for me and then after writing sample code to reliably reproduce it, yesterday morning…it simply went away. I changed nothing…in fact one system that was connecting and repeating for me is 1300 miles away. I know I changed nothing there. Clearly there is a recurring problem and whatever fixed it was a byproduct of something on the server side. If they “fixed it” accidentally, I agree, they will break it accidentally again…

@Dmitriy This discussion, and reportedly randomly recurring issue, seems to linger on like that aforementioned burritos results :burrito:… is there or is there not a still known “terminal duplicating strings” issue?

@Gunner I had the problem a few days ago with latest version of everything. Fix for me was killing the app and starting it back up.

1 Like

That might explain why I don’t seem to run into this issue… most any project I use with the terminal widget is ran on an as needed basis with phone/tablet shutdown in between… well that and I never use the terminal.print() terminal.flush() method…which I still suspect may exacerbate the issue.

No developers seem concerned either?

I don’t use terminal commands, only Blynk.virtualWrite(). It’s quite gruesome when it pops up seeing everything in duplicate.

1 Like

In my experience, visual issues that get ‘corrected’ when the screen is refreshed or resized (forcing a refresh) are always to do with the display code (GDI stuff). This bug could be in the depths of Android or in the implementation of the widget. It is extremely unlikely to be the code that put the (irrelevant) text in the widget.

1 Like

Depends on HOW the code puts that text into the widget, No, not necessarily is it the cause, but yes it does seem to matter. Besides I believe the terminal commands were early stage development and may contain something that allows this “buffered” duplication at random times. But until (if) a developer says different, then this is all experiential observations from a few long term Blynk users… but what do we know :stuck_out_tongue: