Pulse to Slack doesn't show data

Hi,

The message (image) received from the pulse always omits data from a specific column. I checked and the column has visibility everywhere.

The only thing I can think of is that the field type is description… implying potentially long text. Is the pulse-Slack API unable to handle long text? (In reality the text is usually just a few lines long).

Any help appreciated!

Hi @Yen
Yes, the Description field type will be removed from pulses, since that type is normally used for longer texts, which isn’t suitable for short things like pulses.
You can set the type to “No special type” (bottom) to include it.

Thanks for this info! Super helpful :slight_smile:

UPDATE: Yikes… sorry @flamber but it seems ever since I changed the field from ‘description’ to no special type, the slack pulse interface just spins… it can’t seem to render a pulse at all anymore (not even one without the text column) and nothing at all is sent to slack. :frowning:

I’m gonna try other types and report back…

@Yen
Which version of Metabase?
Do you see any errors in the Metabase log, when it’s just spinning? Admin > Troubleshooting > Logs

Found these:

{:message "TypeError: formatter is not a function",
:type jdk.nashorn.internal.runtime.ECMAException,
:stacktrace
("jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)"
"jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)"
"jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)"
"jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)"
"jdk.nashorn.internal.runtime.Undefined.lookup(Undefined.java:102)"
"jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:106)"
"jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:98)"
"jdk.internal.dynalink.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:176)"
"jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)"
"jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:154)"
"jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:253)"
"jdk.nashorn.internal.scripts.Script$Recompilation$344$131978AAA$\\^eval\\_.L:10#L:4262#makeCellBackgroundGetter#L:4301(<eval>:4306)"
"jdk.nashorn.internal.scripts.Script$Recompilation$316$129273AAA$\\^eval\\_.L:10#L:4187#L:4190#makeCellBackgroundGetter#L:4210(<eval>:4211)"
"jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:643)"
"jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)"
"jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)"
"jdk.nashorn.api.scripting.ScriptObjectMirror.call(ScriptObjectMirror.java:117)"
"--> pulse.color$get_background_color.invokeStatic(color.clj:60)"
"pulse.color$get_background_color.invoke(color.clj:56)"
"pulse.render$render_table$fn__26682$fn__26684.invoke(render.clj:373)"
"api.pulse$fn__58017.invokeStatic(pulse.clj:165)"
"api.pulse$fn__58017.invoke(pulse.clj:158)"
"middleware.auth$enforce_authentication$fn__59926.invoke(auth.clj:14)"
"routes$fn__61084$fn__61085.doInvoke(routes.clj:56)"
"middleware.exceptions$catch_uncaught_exceptions$fn__60017.invoke(exceptions.clj:104)"
"middleware.exceptions$catch_api_exceptions$fn__60014.invoke(exceptions.clj:92)"
"middleware.log$log_api_call$fn__61458$fn__61459.invoke(log.clj:170)"
"middleware.log$log_api_call$fn__61458.invoke(log.clj:164)"
"middleware.security$add_security_headers$fn__59980.invoke(security.clj:105)"
"middleware.json$wrap_json_body$fn__61163.invoke(json.clj:61)"
"middleware.json$wrap_streamed_json_response$fn__61181.invoke(json.clj:97)"
"middleware.session$bind_current_user$fn__58593$fn__58594.invoke(session.clj:193)"
"middleware.session$do_with_current_user.invokeStatic(session.clj:176)"
"middleware.session$do_with_current_user.invoke(session.clj:170)"
"middleware.session$bind_current_user$fn__58593.invoke(session.clj:192)"
"middleware.session$wrap_current_user_id$fn__58582.invoke(session.clj:161)"
"middleware.session$wrap_session_id$fn__58567.invoke(session.clj:123)"
"middleware.auth$wrap_api_key$fn__59934.invoke(auth.clj:27)"
"middleware.misc$maybe_set_site_url$fn__61523.invoke(misc.clj:58)"
"middleware.misc$bind_user_locale$fn__61526.invoke(misc.clj:74)"
"middleware.misc$add_content_type$fn__61511.invoke(misc.clj:30)"
"middleware.misc$disable_streaming_buffering$fn__61548.invoke(misc.clj:119)"
"middleware.misc$wrap_gzip$fn__61541.invoke(misc.clj:101)")}

Jul 12 18:51:12 ERROR metabase.pulse :: Error sending notification!
<eval>:4306 TypeError: formatter is not a function
at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)

@flamber metabase version v0.32.8. See logs above (or maybe below - sorry - I posted stuff out of order).

@Yen
Okay, I’m pretty sure you’re hitting this issue (very bad description, scroll down to bottom):
https://github.com/metabase/metabase/issues/9891
It’s been given Priority 1, but it hasn’t been scheduled for any milestone yet - the team is busy working on the major query browser overhaul in 0.33

So even if you change the type back to Description, it still doesn’t work?
Do you mean that now all pulses are not working or just this single item?

EDIT: Latest release is 0.32.9 (not that I think it will solve your problem, but just noting it)

I’m gonna go back and check if it’s ALL pulses or just this one… I suspect its just this one - i don’t think we’ve impld any other pulses yet). Will report back.

OK as far’s I can see, other pulses work. (pulses without problematic long-form text fields).

@Yen Okay, that’s good. But does the failing pulse start working again if you change field type back to Description?
EDIT: I’m trying to see if I can reproduce your problem, since that will help fixing the issue.

Hi @flamber, yes - the failing pulse starts working again when I change the field back to description - but, per the issue that kicked everything off, the description field itself is never rendered.

HTH!

@Yen Great! I think we’re on the right track to figuring out what’s going on then.
Can you tell me more about that fields contents:

  • How many characters (how long) is the average, and the longest row?
  • Does contain special characters like new lines?
  • What is the actual database column type of that field?

It is anything that you can type into a slack message. So yes there may be newlines, there MAY be markdown down and emojis but so far I’m not seeing any.

About 75% is a single line comment.
The rest might be a paragraph of text, at most two.

HTH.

@Yen Okay, I’ve tried multiple different ways to reproduce this without success. I’ve tried to create a varchar(2000) column and populate it with random text and special characters (newline, emoji, etc), but it doesn’t trigger the error. I’ll leave a comment on the issue, and maybe it will help pointing in the right direction.

Really?
Wow…
@flamber if helps, the underlying, origin datatype was postrgresql text. ¯_(ツ)_/¯

@Yen Also tested on Postgres 11.4 with text, but still not able to trigger the error. Not sure what the conditions should be to reproduce the problem.