# Mobile app crash with plugin

**URL:** <https://forum.mattermost.com/t/mobile-app-crash-with-plugin/14488>\
**Category:** Mobile Apps\
**Created:** [November 21, 2022, 9:42pm UTC](https://forum.mattermost.com/t/mobile-app-crash-with-plugin/14488 "2022-11-21T21:42:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kasperdun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/kasperdun/32/6093_2.png) [@kasperdun](https://forum.mattermost.com/u/kasperdun)\
**Post date:** [November 21, 2022, 9:42pm UTC](https://forum.mattermost.com/t/mobile-app-crash-with-plugin/14488/1 "2022-11-21T21:42:46Z")

</div>

Hi, I developed plugin and it works fine on PC, but when I type command in mobile version (ios), just type /  
application shows error message with text like “your svg is not valid” but in my plugin I don’t use any svg.  
If I disable my plugin then commands work fine without any error  
Can you help me?  
What I should check in my plugin?

 ![IMG_7106.PNG](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/8/88f052678c70a388d7fe9dfcf19d7b1aa67ac640.jpeg)

---

<div class="post-metadata">

**Author:** ![kasperdun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/kasperdun/32/6093_2.png) [@kasperdun](https://forum.mattermost.com/u/kasperdun)\
**Post date:** [November 23, 2022, 3:50pm UTC](https://forum.mattermost.com/t/mobile-app-crash-with-plugin/14488/2 "2022-11-23T15:50:11Z")

</div>

Solved.  
Just command icon can not be png, just svg

```auto
func (p *Plugin) getCommand() (*model.Command, error) {
	iconData, err := command.GetIconData(p.API, "assets/profile.png") // - can not be png
	if err != nil {
		return nil, errors.Wrap(err, "failed to get icon data")
	}

	return &model.Command{
		Trigger: "trig",
		AutoComplete: true,
		...
		AutocompleteIconData: iconData,
	}, nil
}

```

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [November 26, 2022, 11:59am UTC](https://forum.mattermost.com/t/mobile-app-crash-with-plugin/14488/3 "2022-11-26T11:59:27Z")

</div>

Hi kasperdun and welcome to the Mattermost forums!

Glad to hear you managed to solve this issue and thanks for sharing the solution!
