Problem: Class Wirechat\Wirechat\... not foundSolution:
1
Clear autoload cache
composer dump-autoload
2
Verify package is installed
composer show wirechat/wirechat
3
Check namespace in files
Ensure you’re using the correct namespace:
use Wirechat\Wirechat\Traits\InteractsWithWireChat;
Not the old namespace:
use Namu\WireChat\Traits\Chatable; // ❌ Old
Migration errors during installation
Problem: Database migration fails with column type errorsSolution:For new installations, ensure your config/wirechat.php is published:
php artisan vendor:publish --tag=wirechat-config
If using UUIDs, set this before running migrations:
'uses_uuid_for_conversations' => true,
This setting only affects new installations. Do not change it on existing applications.
Table prefix not applying
Problem: Tables are created without the configured prefixSolution:The table_prefix setting in config/wirechat.php only affects new installations. If you’ve already run migrations, you’ll need to:
Problem: Cannot find users when creating conversationsSolution:Ensure your User model implements the WireChatUser interface:
use Wirechat\Wirechat\Contracts\WireChatUser;use Wirechat\Wirechat\Traits\InteractsWithWireChat;class User extends Authenticatable implements WireChatUser{ use InteractsWithWireChat;}
The interface requires these accessor methods:
getWirechatAvatarUrlAttribute()
getWirechatProfileUrlAttribute()
getWirechatDisplayNameAttribute()
Avatar images not displaying
Problem: User avatars show as broken images or SVG fallbackSolution:Implement the getWirechatAvatarUrlAttribute() method in your User model:
public function getWirechatAvatarUrlAttribute(): ?string{ return $this->avatar ? Storage::url($this->avatar) : null;}
WireChat will automatically fall back to an SVG avatar if the method returns null or the image fails to load.
Participant limit errors
Problem: “Private conversations cannot have more than two participants”Solution:This is expected behavior. Private conversations are limited to 2 participants and self conversations to 1 participant. The limits are enforced in Conversation.php:219-233.If you need more participants, create a GROUP conversation instead:
use Wirechat\Wirechat\Enums\ConversationType;$conversation = Conversation::create([ 'type' => ConversationType::GROUP,]);
Problem: Deleting messages removes them for all participantsSolution:This is expected in v0.0.x - v0.1.x. WireChat v0.3.0+ implements Smart Deletes where messages are only hidden for the user who deleted them, not removed from the database.The deletion is tracked via the actions table with type Actions::DELETE scoped to each participant.
Problem: Code still uses Chatable trait after namespace upgradeSolution:The namespace upgrade command only changes the namespace, not trait names. Manually update:
Problem: Error 422: “Participant is already in the conversation”Solution:This error is thrown when trying to add a user who is already a participant. Check if the user exists first:
Problem: Error 403: “Cannot add [user] because they were removed from the group by an Admin”Solution:When a user is removed by an admin, they can only be re-added by explicitly undoing the removal:
Problem: Error 403: “Cannot add [user] because they left the group”Solution:When a user voluntarily exits a group, they cannot be re-added automatically. This is by design to respect the user’s choice to leave.Only admin removal can be undone (see above).