Repetitive, intrusive error in Juno: "MethodError: no method matching peekchar(::IOBuffer)"

I’m using Juno in Atom, with atom 1.59.0 x64 on a mac M1 Pro. Julia-client is version 0.12.6, and julia itself is version 1.7.1.

I’m getting repetitive and intrusive errors, sometimes just when moving my mouse. These appear as “Julia Client — internal error” with text as below. These seem to be more frequent when my text and/or mouse cursor is in a line with string literals in it.

Here’s a full error log:

MethodError: no method matching peekchar(::IOBuffer)

Closest candidates are:

peekchar(!Matched::Tokenize.Lexers.Lexer) at ~/.julia/packages/Tokenize/8K64V/src/lexer.jl:138

peekchar(!Matched::CSTParser.ParseState) at ~/.julia/packages/CSTParser/uIeiO/src/lexer.jl:69

parse_string_or_cmd(ps::CSTParser.ParseState, prefixed::Bool) at strings.jl:120

parse_string_or_cmd at strings.jl:25 [inlined]

mLITERAL(ps::CSTParser.ParseState) at spec.jl:162

INSTANCE(ps::CSTParser.ParseState) at spec.jl:232

parse_expression(ps::CSTParser.ParseState) at CSTParser.jl:57

macro expansion at internals.jl:157 [inlined]

macro expansion at utils.jl:58 [inlined]

parse_comma_sep(ps::CSTParser.ParseState, args::Vector{CSTParser.EXPR}, kw::Bool, block::Bool, istuple::Bool) at internals.jl:151

parse_comma_sep(ps::CSTParser.ParseState, args::Vector{CSTParser.EXPR}, kw::Bool) at internals.jl:150

macro expansion at utils.jl:197 [inlined]

parse_call(ps::CSTParser.ParseState, ret::CSTParser.EXPR, ismacro::Bool) at internals.jl:138

parse_call(ps::CSTParser.ParseState, ret::CSTParser.EXPR) at internals.jl:116

macro expansion at utils.jl:83 [inlined]

parse_compound(ps::CSTParser.ParseState, ret::CSTParser.EXPR) at CSTParser.jl:107

parse_compound_recur(ps::CSTParser.ParseState, ret::CSTParser.EXPR) at CSTParser.jl:74

parse_expression(ps::CSTParser.ParseState) at CSTParser.jl:69

parse_block(ps::CSTParser.ParseState, ret::Vector{CSTParser.EXPR}, closers::Tuple{Tokenize.Tokens.Kind, Tokenize.Tokens.Kind, Tokenize.Tokens.Kind}, docable::Bool) at internals.jl:31

parse_block at internals.jl:8 [inlined]

parse_try(ps::CSTParser.ParseState) at keywords.jl:356

macro expansion at utils.jl:58 [inlined]

parse_kw(ps::CSTParser.ParseState) at keywords.jl:13

parse_expression(ps::CSTParser.ParseState) at CSTParser.jl:46

macro expansion at utils.jl:118 [inlined]

parse_operator_eq(ps::CSTParser.ParseState, ret::CSTParser.EXPR, op::CSTParser.EXPR) at operators.jl:225

parse_operator(ps::CSTParser.ParseState, ret::CSTParser.EXPR, op::CSTParser.EXPR) at operators.jl:374

parse_compound(ps::CSTParser.ParseState, ret::CSTParser.EXPR) at CSTParser.jl:125

parse_compound_recur(ps::CSTParser.ParseState, ret::CSTParser.EXPR) at CSTParser.jl:74

parse_expression(ps::CSTParser.ParseState) at CSTParser.jl:69

parse_doc(ps::CSTParser.ParseState) at CSTParser.jl:199

parse(ps::CSTParser.ParseState, cont::Bool) at CSTParser.jl:225

parse at CSTParser.jl:171 [inlined]

locals(text::String, line::Int64, col::Int64) at local.jl:46

localdatatip(word::String, column::Int64, row::Int64, startrow::Int64, context::String) at datatip.jl:40

datatip(word::String, mod::String, path::String, column::Int64, row::Int64, startrow::Int64, context::String) at datatip.jl:24

(::Atom.var"#329#330")(data::Dict{String, Any}) at datatip.jl:16

handlemsg(t::Dict{String, Any}, args::Dict{String, Any}) at comm.jl:169

invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) at essentials.jl:716

invokelatest(::Any, ::Any, ::Vararg{Any}) at essentials.jl:714

(::Atom.var"#31#33"{Vector{Any}})() at task.jl:423

Maybe Regression · Issue #196 · JuliaLang/Tokenize.jl · GitHub.

Fixed by CSTParser@3.3.1 ?